Common Mistakes

From ArduinoInfo
Jump to: navigation, search

Some Common Mistakes Made In Arduino Programming

  • Confusion in changing variable </span>values Vs. comparing variables. </span>
    • To set one variable equal to a number use "=" for example to set the variable Speed to 100 you would do "Speed = 100".</span>
    • For a logic statement however you use "==" for example to see if the variable Speed </span>equaled 100, you would use "Speed == 100".</span>
    • Other logic statements also use doubles for example, to see if Speed is greater than or equal to 100 you would use "Speed >= 100".</span>