In my mind, love is just a matter of increasingly intense oscillatory motion until one reaches a breaking point. I don’t replicate the ‘increasingly intense’ part in my project, but I do try to replicate the oscillatory nature of love, and love making. If you can successfully make the sensor oscillate between two thresholds in a certain time, the lights will go off, providing that sweet sweet release we all lust for. If you can’t do it fast enough, a single light will flash suggestively. Rhythmic motion is the essence of love! I’ll post a video as soon as I get my phone in the IM lab.
The hardware part of this project was pretty simple to hook up, but figuring out the software side was a little trickier. My code is messy and not very impressive. I did use some arrays, and for loops to light up 4 lights, instead of doing each one individually. This is useful because I could put in more lights, and all I’d have to do is tell my script that I have more lights, and just throw the new pin number in an array. I wonder if I can iterate over arrays directly in Arduino, like in Python…