Skip to content

Control your Raspberry PI GPIO in Real Time via the Browser using NodeJS, Socket.IO and pi-gpio.

License

Notifications You must be signed in to change notification settings

fgheorghe/jsGPIO

Repository files navigation

Control your Raspberry PI GPIO via the Browser using NodeJS, Socket.IO and pi-gpio.

Requirements

Install the latest node.js on your Raspbian:

https://github.com/joyent/node/wiki/installing-node.js-via-package-manager

Install GPIO Admin, to allow users other than root to access the GPIO:

https://github.com/quick2wire/quick2wire-gpio-admin

Install JSGPIOServer NodeJS Dependencies

To install JSGPIOServer dependencies, issue:

npm install

Configuration

To configure the application change SocketIo.URL to point to your Raspberry PI IP address, found in index.html.

Optionally, change the listening port for the example server, by editing example-server.js

Start server

To start the example server, issue:

npm start

Or:

nodejs example-server.js

Navigate to your Raspberry PI IP and port to view the example.

Developer notes

jsgpio-server.js - Provides a basic NodeJS module. See documentation for details.

jsgpio-client.js - Provides a basic client for the server.

example-server.js - Provides an example server.

index.html - Provides example usage.

About

Control your Raspberry PI GPIO in Real Time via the Browser using NodeJS, Socket.IO and pi-gpio.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published