PComp- Hide Your Circuits

… Except my circuit is under clear acrylic, but that’s a whole ‘nother story.

This week the planets aligned and my Intro to Fab assignment coincided with this one. I was hoping to make a protective home for my circuit, while also graduating to panel-mount LEDs and switches. I also wanted to play around and get comfortable with Digital Input and Output.

This week’s project was an exploration in getting something 99.995% working, before realizing that you actually had the entire thing wrong and breaking it down to start over. Last week I had a complete circuit with the LED, but adding the piezo into the equation was not making logical sense to me. This is as far as I got before the weekend:

Then, after some much-needed office hours, I was armed with a new way of thinking about the circuit. I did a rough sketch to make sure I retained my understanding, before turning to Fritzing to confirm it.

Clean slate ready to go, it was time to start over. This is no revelation, but it helps to refer to the visual schematic while setting up the breadboard.

The alligator clips that complete these three circuits make my brain hurt- there’s got to be a better way and I hope I figure out what that is soon.

Piezo circuit: I connected it through D6,  then down through a 220 pulldown resistor, and then to ground.

LED circuit: Similar to the piezo, I connected it to D7, then through a 220 resistor, and then to ground.

Switch circuit: For the arcade button, the power, as I understand, came, not from the 5v, but from digital input (I could be very, very wrong). I connected it to D2, ran it through the alligator clip wires, and down through a 10 ohm resistor to ground.

Then I went into Arduino and wrote the code that would bring my pseudocode to life.

Jim helped me understand how to program the “tone();” function, as well as introduced me to “noTone”. That way in my conditional statement, if the digitalRead was LOW, there would be no tone. First try, we uploaded and this was the result. It’s not the world’s most sophisticated piece, nor the most conceptual. But it gave me a chance to internalize the past labs and self-correct.

My biggest lesson of the week? Try taking the rubber caps off your meters before using them. That would explain them not working…

My next goal for this is to add a more conceptual layer to my programming, as right now it is pretty one-dimensional and void of personality. Case in point: Terrick’s rubber band shooting gun is the absolute coolest!

*UPDATE* I programmed it to play the first bar of “Free Fallin'” by Tom Petty (RIP)

 

*UPDATE_PART_2* Challenged to make the song stop seemed like it’d be a thing where I just roll into ITP for an hour or two. Cut to two full days later. I can (kind of) make it stop? Meanwhile, I need to at least change this Tom Petty song. Maybe the Travelling Wilbury’s or something…

Man, who knew pausing could be so complicated for me? Wait, I pretty much knew.

Leave a Reply

Your email address will not be published. Required fields are marked *