leon-anavi/rpi-nodejs-examples

Button.js breadboard setup

Closed this issue · 4 comments

Hi, first of all great tutorial about the blinking light with JavaScript.
I was wondering if you could also post a picture of the setup for the button.js script that is included in this repo. Please?

Hi,

Please have a look at the video: https://m.youtube.com/watch?v=3nI4iNmBKWo

In the description of the video you will find the same link to an article with details about the wiring: http://www.instructables.com/id/JavaScript-for-IoT-Controlling-a-Button-on-Raspber

Best regards, Leon

Hi Timothy,

I hope you have managed to get the button working following the link that I provided. I will close the issue.

Best regards, Leon

Hi Leon,
Thanks for you reply. I'm not sure why I couldn't find that extra tutorial with a search. Anyhow, using your diagram works fine. I'm not experienced at hardware, and I can't get any other pins to work except configPin = 7. Not sure why. As a next step I wanted to turn on the blinking light using the button, but trying to use another pin for the button does not seem to work. I have to learn more about the GPIO pins I suppose!
Regards,
Tim.

Hi Timothy,

I am glad that you have managed to get it working using the diagram. If you want to skip the wiring I can recommend you my open source hardware project for Raspberry Pi HAT called RabbitMax Flex. It has a button and a RGB LED as well as a bunch of other useful things for quick IoT prototyping. Right now there is a crowdfunding campaign in IndieGoGo for it here: https://www.indiegogo.com/projects/rabbitmax-flex-raspberry-pi-hat-for-iot/x/10833949

The project features examples in Python and C which can be adapted for node.js.

Best regards, Leon