This is a basic example of GPIO control on the rasperry pi
Clone or download
Page- Merge pull request #2 from mgalgs/patch-1
app.js: Simplify toggling logic
Latest commit b2bc595 Jun 14, 2016
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs/images added diagram to readme Oct 23, 2014 Update Oct 23, 2014
app.js app.js: Simplify toggling logic Jun 14, 2016 removed tty.js deps and apt-get stuff Oct 23, 2014
package.json changed name in package.json Oct 23, 2014

Basic GPIO with node.js

This is a basic example of GPIO control on the rasperry pi using the pi-pins module from npm

In this example we have a LED on pin 22 which will light up when the button is pressed on pin 17 and switch off when pressed again.

All you need to do is :

  • clone this repo locally and cd into the folder.
  • connect up the pi as shown in the diagram :
  • add the resin remote repo with git remote add resin , with the correct github and app name, or just copy if from the top right hand corner of your device dashboard on
  • now just git push resin master wait a minute or so for the code to upload and start.
  • enjoy the all the LED goodness...

Circuit diagram