3 ms·
I've tinkered with a number of raspberry pi projects and one thing which blew my mind was how expensive many options for "adding a simple button" was. I had in
by Fuzzwah 12y ago
I've tinkered with a number of raspberry pi projects and one thing which blew my mind was how expensive many options for "adding a simple button" was.
I had in mind that I'd be able to find a simple usb connected button for next to nix. My research instead turned up prices from $25 to $100.
So rather than a simple single button connected via usb, I found the best options have been:
* a usb numberpad (~$10)
* a usb MCE infrared remote (~$15)
* an amazon basics wireless mouse (~$5)
* an rfid reader + 50 nfc cards (~$20)
In each case, the solution I landed on ended up being cheaper, more versatile and functionally superior to a single simple button.
For example, the wireless mouse is now an interface for a music playback machine. Originally I imaged just a single button which would start and stop the music. With the mouse I added the option of changing the volume using the mouse wheel.
- jarek 12y agoI think the cognitive disconnect is that an on-off or momentary contact button is technically extremely simple if you know what you're doing and have a GPIO pin. But if you don't, you'll pay for bttn-like devices like you implicitly pay for IFTTT.
- linuxlizard 12y ago> momentary contact button is technically extremely simple Don't forget debounce. Debouncing can be tough. http://www.ganssle.com/debouncing.htm http://www.ganssle.com/debouncing.htm
- jarek 12y agoEasier to do in software if you can spare the CPU cycles, thankfully. http://arduino.cc/en/Tutorial/Debounce http://arduino.cc/en/Tutorial/Debounce or http://playground.arduino.cc/code/bounce http://playground.arduino.cc/code/bounce https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/buttons_and_switches/ https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robo...
- kaoD 12y agoThat report only shows that some buttons suck, but software debouncing is really simple if you can program or Google the code. You can also debounce on hardware with a capacitor. Really simple too and does not waste CPU cycles.
- Fuzzwah 12y agoThank you for that link. Very entertaining and informative on a topic which I never realized was as complex as it is.