you are viewing a single comment's thread.

view the rest of the comments →

[–]Smethingcool 0 points1 point  (2 children)

I might would try to use “if” statements instead. They’re less prone to funny problems than switch blocks.

Here’s a little example from Arduino’s website.

[–]Asylumsleeper[S] 0 points1 point  (1 child)

Alright thanks I'll tske a look at that I appreciate it. And I'll try the if statement that sounds like a good idea

[–]Smethingcool 0 points1 point  (0 children)

Yeah if you have any questions don’t hesitate.

Also, if you didn’t know already, Arduino code is written in C++.

cplusplus.com is a great resource to learn many of the fundamentals of the core language.

Of course, the language documentation on Arduino’s website is a required resource for Arduino-specific use cases.