switch() case

This is a beautiful example of Simon’s first daring steps to create his own codes with Arduino. He wanted to make the computer (the serial monitor) say “Yes” once the dimmer was on, then say “No” and then “A Chance”. He tried using switch() case statements instead of if() else statements, but didn’t know about the word “switch”, so he wrote an if() case statement which didn’t work. I googled it for him and corrected the code to my best knowledge (the “Yes” worked within the switch() case statement and the “A Chance” as default, but we didn’t get the “No”to work). Simon was happy to see most of the project work but still seemed to be more interested in the process of writing it than in actually seeing it function.

Leave a comment