The plotter is working! Finally. But wait, I have to get everything caught up in the blog, now that I have a blog. Should I go for the VCR-rewind jaggedy tape along with reversed, accelerated sound bite? Nah, so few know what that experience was like these days. But then again, even fewer know what pen plotters are...
So let us jump into the wayback machine and go back to April.
Around April, the boys decided they wanted to be in the Maker Faire, and Jake had a very cool idea for a very complex contraption.
Fast forward a bit, and suddenly we're knee-deep in Arduino land, the land of physical computing.
The path went something like this:
Get Arduino (i.e., "borrow" the one that the boys got for Christmas)
Learn how to make internal LED blink. OK, that was easy, it came pre-configured to do that.
Learn how to change how it blinks.
Make it light up an external LED. Learn about resistors for LEDs, and pull-up and pull-down resistors.
Learn how to make lots of LEDs blink. Learn how to buy lots of 220 or 330 ohm resistors.
Get annoyed at how every LED takes an input pin. Learn about shift registers (<insert part ID here>). Get to know Jameco (yay!) and Halted (yay!). Get shift registers from Jameco. Get a random LED bar from Halted. Wire them up. Frustrated at forgetting to set the Enable pin to the right voltage. Woohoo, it works!
So at this point, I have a circuit that kind of looks like this:
This would eventually form the basis of the WBMD at Maker Faire, using the shift registers to give me lots more pins to work with, and those would let me control several motors.
The picture above doesn't show the LED bar, but you get the idea (I hope). The LED bar had 10 LEDs on it, and the ones at 5 and 10 were yellow, while the rest were green.
Interested in feedback, I found an old optical resistor that I'd scavenged out of a dead garden stake. These were $5 garden stakes that you could buy at the hardware store, and they'd come with one white LED, one solar panel, a rechargeable battery, and a little optoresistor and some circuitry to tell whether to charge (in daylight) or discharge (at night). Those died not very long after they were purchased. So it goes. I saw similar at the Dollar Store recently, yet I still see similar for over $5 when packaged neatly at other places. Go figure.
I wired up the optical resistor as an analog input, set up some code to do self-calibration while running, and made it into my magic trick. Wave your hand over the piece of paper that is concealing the optical sensor, and it gets less light. As you shade the sensor, the number of lit LEDs would come down. Remove your hand or shine a light on it, and the count would go up. As you'd expect, with a bar of LEDs, you get a fun meter-type look. I just wish that it had only one yellow LED, and the rest were green. First fun project with interactivity completed.
Merit badges
- Arduino basics
- Lighting an LED (and choosing the right resistor for it)
- Lighting multiple LEDs
- Learn where to get materials (Jameco, Halted)
- Wiring up a shift register
- Wiring up two shift registers in series
- Analog input using an optical resistor
- Automating calibration
No comments:
Post a Comment