love meter

My initial idea for this was to make a circuit with two knobs and one LED, where each person would turn one knob and the difference between the two would light up the LED in a reverse relationship (meaning, if person A turns their knob to 75% and person B turns their knob to 70%, they’re pretty “in sync” and so the LED would shine brightly to indicate that).

When building the first test, I couldn’t get the second knob to light up the same LED, so I connected a second LED and ended up liking that because it kind of looked like a heart. I later realized I had a typo in my code (I wrote “potVal = analogRead(potVal)” instead of potPin inside the parentheses), so maybe my first idea would have worked anyway. But by that point I decided to keep it as it was — both because I liked the look, and because I wouldn’t have to think about how to calculate that margin of difference between both potentiometers.

the top half of a heart!

The next step was adding a switch to show both lights at the same time. This way, there’s no “cheating” by seeing how bright the first person’s light turns. I also turned one of the potentiometers upside down, to make it harder to tell which direction would turn the light brighter or lower.

The code looked like this — I used the bits from the switch as toggle again, but the lights didn’t actually turn off when I clicked the second time since I only wrote “analogWrite”. While testing, I just clicked the reset button, so I forgot to change the code until after I dismantled the circuit.

Here it is in action — in the first test, you’ll see one of the lights is a lot dimmer than the other (uh oh), while in the second test they’re closer together (phew, marriage saved). For the sake of compatibility, it wouldn’t matter whether they’re dim or bright, just that they’re similar in brightness. Maybe two dim lights would indicate a pretty chill and mellow couple.

Here is the finished product:

In a future version of this, I’d love to use the RGB LED and make it a nice, cute, romantic shade of pink. I’d have to get that margin of difference formula right, and figure out how to get the pink to stay consistent across different brightness levels (maybe I’d have to set some specific margins for input and shades of pink for output, and it wouldn’t be as seamlessly analog?). I’d also take the opportunity to fix that toggle switch so I don’t have to hit the reset button. Lastly, I’d love to use some bigger, cushier potentiometers to save my poor thumb during the dozens of tests I did. Make sure to moisturize when you’re done with those fellas.

the things we do for love

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s