Before getting my hands dirty, I read the first chapter of the Arduino Projects Book to give me an overview of what am I getting myself into. I was hooked! After quickly absorbing the types of components, I read about Series & Parallel circuits.
My first project was lighting up an LED by hooking up a resister, an LED to the 5v power supply. I admit I also tried the variation with a switch – depress the switch to get the LED going - from the Arduino book.
At this point, I fired up the IDE and ran the ‘Blink’ sample. I immediately understood the idea of Arduino’s digital pins. The pins represent 0/1 (On/off) state by sending / stopping electric current through them. Cool!
I realized I understood enough to start my first project! Yes, it’s going to be something I come up with on my own! It was going to be a Morse Messenger!
I will have my circuit blink out a message in Morse Code! Of course, what am I good at? Writing programs
Didn’t realize my C++ was so rusty. How the heck do you write Jagged arrays? I’m sorry, Mr. Kanetkar, I have forgotten all my pointer lessons.
Though I was using Visual Micro, I hadn’t yet figured out how to debug with break points. Subject of another blog post I guess. For now, I was able to make do with “Serial.print*” statements.
The first version of the circuit did not have the Piezo. However, I realized I was not able to read the message (despite the fact I was trying to decipher Morse Code for the first time in my life ), and I needed an audible cue to distinguish dashes from dots. Lo & behold: The parallel circuit with both LED & Piezo.
It’s interesting to note that Arduino allows the use of the same pin (10) for controlling both Piezo (analog) & LED (digital).