switch/case


hello,

i had following code (not complete):

switch (wind_direction)
{
  case'30':
  serial.print("zw");
  break;
}

is possible define '30' value of 25 - 35?
the value 30 in circumstances little bit lower or higher, in range must serial.print("zw").

ideas?

gr.
johan


hello,

i had following code (not complete):

switch (wind_direction)
{
  case'30':
  serial.print("zw");
  break;
}

is possible define '30' value of 25 - 35?
the value 30 in circumstances little bit lower or higher, in range must serial.print("zw").

ideas?

gr.
johan


you better off using if statements if have check range. 99.2% sure switch case steady-state.


Arduino Forum > Using Arduino > Programming Questions > switch/case


arduino

Comments

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO