Simon Code Progress
This week I worked on getting the Simon code to respond to a user’s input. I started from the example files that Yury provided and modified the code to work with my breadboard set-up and play the “you lose” tone if the canned user input was wrong. I also worked on getting the Arduino to read the button input (HIGH or LOW) as values of user input that could be compared to Simon’s array.
The tactic I tried for evaluating the user input was to store the data as an array and check that array against Simon’s. After doing some research I found a discussion on a Processing forum that provided code for reading and storing bytes of data from an Arduino.
I was able to incorporate this code into my sketch. I could open the serial monitor, input a few numbers, and have the code write those numbers back to me. I then attempted to get button output to behave the same way, but was unsuccessful.
Here’s my code: