This week we were challenged to pick another project from
the book or in my case from the SparkFun website. I looked through the Arduino book and at the
SparkFun website and decided I liked the sound of the Simon Says projects. Mainly because I love the game Simon
Says. Following the diagram on the
website, it was pretty easy to set up, even though I changed most of the
locations on the breadboard because mine was set backwards compared to the
diagram but I could easily figure it out and got the board all set up. Simon Says uses a piezo buzzer, 4 LEDs – red,
blue, green, and yellow, 4 - 330-ohm resistors, 4 pushbuttons, 17 jumper
wires, along with the Arduino and the breadboard. Like I said the setup was pretty easy but I
was nervous about the piezo buzzer because mine was bigger than the one shown,
but I was able to get it in the same spot on the board and just had to adjust
one or two of the jumper wires positions.
Then I set out to read the code and see what I understood of it and
typed the code in. I verified the code
and got no errors. So, I plugged in the
Arduino and uploaded the code to the board, and I got the noise and the LEDs
started blinking. They LEDs kept
blinking until I hit a push button, I was a little shocked because I had been
so worried about this build since I thought it might be harder than I could
handle.
In my
excitement of everything working I ended up noticing that the green LED wasn’t
lighting up like the others. So, I went
back to the diagram and made sure everything was in the right spot and it
looked like it was, so then I thought that maybe I needed to change something
in the code since my setup was a little different than the diagram. I found out though that the pins and didn’t
change so that wasn’t the deal. I then
went back to the breadboard and looked at the wires going to the green LED and
saw that my jumper wire was in i13 and it needed to be in i12 so I moved it and
hoped that was the problem. I then
plugged the Arduino back in and reloaded the code and it worked. Wahoo!!!
Then I pushed a push-button and I realized that I think the resistor for
the blue LED and the cathode end of the yellow might have been in the same line
or too close so I changed the cathode of the yellow LED to 21 from 19 on the
breadboard and the negative. I was
hoping this would fix the problem and it did.
I was proud of myself for not getting frustrated when there were some
issues. I had fun playing with it trying
to see if I could make it to the end, which was 13 in a row. Apparently, I can’t remember that mean light
sequences. HAHA!!!
I then went to the code and found that I could adjust the number of times needed to get to the end, so I changed it to 5 so I could see what it did when I got that many in a row. Well, it makes noise and the LEDs all start blinking again. I also saw that the response time was set at 3000 ms (3 seconds), so I changed it to 2000 ms (2 seconds) and that was okay until I got to round 10 and I wasn’t able to move fast enough to get the push button pushed. I then changed it to 1000 ms (1 second) and I could only get 5 rounds before I wasn’t fast enough to answer. After playing with the time, I decided that 3 seconds was the right amount of time.
Simon Says setup notes.
Pictures of the circuit from different angles.
Tinkercad diagram I made. The purple cords aren’t on my
board but I needed them to get the LEDs to connect correctly in the diagram so
the code would work in Tinkercad.
Video of Simon Says.
I enjoyed
this build as it was one that was interactive and fun. It is also one that I would build again and
play with my children. They both had fun
playing with it and thought that it was cool that mom could make that. This type of circuit can be seen in the Simon
game, as well as other electronic games that children enjoy playing. All the lights, colors, and music make it fun
and entertaining.
