Robot - How I ended up overcomplicating a button
If you are trying to put together your own robot following my instructions you might have stepped into a photo interrupter being used as a simple button.
Here’s the reason behind that:
For v2 I wanted to add some kind of input and output.
For now, the bare minimum input I needed was a button, and I had a bunch of these sensors in a box somewhere.
My first try was the metal touch sensor. Never got to make it work, and I gave it a 50% chance that the sensor was broken (the integrated LED turned on and off for a couple times, then stopped reacting to any touch).

This is what I put together with the metal touch sensor
Then I moved to the most obvious one: the button sensor. Also didn’t work.
At this point I was frustrated and tired. I wanted to have something working that would return a 0 or 1 to the robot’s brain program.
So I connected the photo interrupter sensor, put a plastic card in the hole and…bingo! 0s and 1s flowing in my logs!
I had to figure out how to make a button out of that simple mechanism, and came up with a tunnelled stick and a rubber band.


If it works, it works
I hope it makes more sense now.