Arduino Fortuneteller

coffee-table   Sometimes I use the state of my coffee table as a kind of magic mirror through which I can glean some pretty powerful insights into my life–like how I desperately need more plano boxes.

  For week three of physical computing, I started noodling around with Arduino, and in keeping with the spirit of this weekend’s Maker Fair, I was inspired to play like a kid. Regression feels good. I was looking for a fun take on the Digital Input/Output lab, and I thought about the playground fortune teller, which was kind of a standby when I was in elementary school. The code is pretty simple:

A few things definitely went wrong. I originally had two parallel LED circuits on the breadboard, each reacting with their own digital input pin. The fortuneteller acted as a switch. When the aluminum foil contacts touched, it completed the circuit, setting the switchRed == HIGH and lighting the first group of LEDs. When it wasn’t HIGH, the other parallel circuit would complete. Digital input took me awhile because I have an impulse to want to connect it to ground. One thing that irks me is why there appears to be a lag with the LEDs. It takes awhile for the LEDs to turn off, three seconds after the contact stops.  I wonder if I’m not using the right components, or if the amps are so low in parallel that it takes longer for them to work their way through the circuit.



← Previous post

Next post →

1 Comment

  1. Benedetta

    This is wonderful! I am so glad that this material is starting to inspire ideas and projects! I am happy to help anytime! B_

Leave a Reply