sketch up of project #1 |
Being the Christmas nerd that I am, I wanted it to play a Christmas song, but not Jingle Bells, because I wanted it to be different. I tried to create a song from scratch - ha, that was tough. I spent way too much time trying to make it work, until I finally searched for a project t that I felt like I could adapt. Using the buzzer and switches, I was able to get my Arduino playing, not one, but two Christmas melodies! I ended up using a project from the web and had fun with it. Each switch activates a different Christmas song when pressed. One of the things I have learned is that there are multiple ways to code the Arduino to do the same thing. This might be one of the things that makes it difficult when figuring out what to do and how to combine. The coding for the project was different than the coding I found for the Christmas songs. For the Christmas songs, I had to use a second tab and upload the "pitches.h" code. It did take me a while to figure this error out, but thankfully there are a lot of resources on line and I was able to figure it out. I learned something new!
Image showing the buzzer and two switches that activate the two different Christmas songs. |
Sketchup for final project - only I had 2 switches, not 3 |
I got the melodies to work, but I have yet to figure but how to combine two different codes. I thought I understood how to incorporate the lighting, but I wasn't able to make the adjustments like I wanted. At some point, I might continue tinkering with it, but I looked up at the clock and it was 12:30 am. Time flies when you're having fun. Realizing I had worked for the majority of my Saturday afternoon and evening without realizing it had been so long, helped me see how far I had come since my first week of frustration with this "thing." 😁 I enjoyed the process and didn't feel frustrated once. I wanted to figure it out, but simply couldn't keep my eyes open, and realized I would have to "play" with my end goal at another time.
I am grateful one of our classmates, Heidy, shared her code with me as she was able to get the lights dancing. I will try for the dancing lights, even if it isn't before posting on my blog.
Below is the code for my final project:
In case you've been curious just how Christmas Crazy my family is and why coding lights would be a welcome addition, here are some pictures of our yard; I'm off to catch up with the inside decorations. This how grad school thing has me a little behind on Christmas cheer.
No comments:
Post a Comment