user68369: I receive an error code of: 'switch' was not declared in this scope
The code is correct so I assume that the necessary library was not included.
Please tell me the correct #include to use.
swith(pwm){
  case 0:   Serial.print(pwm); Serial.print("   ");_delay_ms(2000);
            break;
  case 31:  Serial.print(pwm); Serial.print("   ");_delay_ms(100);
            break;
  case 63:  Serial.print(pwm); Serial.print("   ");_delay_ms(100);
            break;
  case 95:  Serial.print(pwm); Serial.print("   ");_delay_ms(100);
            break;
  case 127:  Serial.print(pwm); Serial.print("   ");_delay_ms(100);
            break;
  case 159:  Serial.print(pwm); Serial.print("   ");_delay_ms(100);
            break;
  case 191:  Serial.print(pwm); Serial.print("   ");_delay_ms(100);
            break;
  case 124:  Serial.print(pwm); Serial.print("   ");_delay_ms(100);
            break;
  case 156:  Serial.print(pwm); Serial.print("   ");_delay_ms(100);
            break;
  case 188:  Serial.print(pwm); Serial.print("   ");_delay_ms(100);
            break;
  case 220:  Serial.print(pwm); Serial.print("   ");_delay_ms(100);
            break;
  case 252:  Serial.print(pwm); Serial.print("   ");_delay_ms(100);
            break;
  default:  break;
}


user68376: It seems you have a syntax error: write switch instead of swith.

68369: <p>I receive an error code of: <code>'switch' was not declared in this scope</code></p>
<p>The code is correct so I assume that the necessary library was not included.</p>
<p>Please tell me the correct <code>#include</code> to use.</p>
<pre class="lang-c prettyprint-override"><code>swith(pwm){
  case 0:   Serial.print(pwm); Serial.print(&quot;   &quot;);_delay_ms(2000);
            break;
  case 31:  Serial.print(pwm); Serial.print(&quot;   &quot;);_delay_ms(100);
            break;
  case 63:  Serial.print(pwm); Serial.print(&quot;   &quot;);_delay_ms(100);
            break;
  case 95:  Serial.print(pwm); Serial.print(&quot;   &quot;);_delay_ms(100);
            break;
  case 127:  Serial.print(pwm); Serial.print(&quot;   &quot;);_delay_ms(100);
            break;
  case 159:  Serial.print(pwm); Serial.print(&quot;   &quot;);_delay_ms(100);
            break;
  case 191:  Serial.print(pwm); Serial.print(&quot;   &quot;);_delay_ms(100);
            break;
  case 124:  Serial.print(pwm); Serial.print(&quot;   &quot;);_delay_ms(100);
            break;
  case 156:  Serial.print(pwm); Serial.print(&quot;   &quot;);_delay_ms(100);
            break;
  case 188:  Serial.print(pwm); Serial.print(&quot;   &quot;);_delay_ms(100);
            break;
  case 220:  Serial.print(pwm); Serial.print(&quot;   &quot;);_delay_ms(100);
            break;
  case 252:  Serial.print(pwm); Serial.print(&quot;   &quot;);_delay_ms(100);
            break;
  default:  break;
}
</code></pre>
 68376: <p>It seems you have a syntax error: write <code>switch</code> instead of <code>swith</code>.</p>
