A simple example using i2c protocol to get data from a sensor on resin.io devices.
Clone or download

README.md

A simple i2c sensor example for resin.io devices.

This is a simple node.js project that uses i2c-bus to get data from a VLNC4000 proximity & light sensor. It is made to be generic and act as base for any i2c sensor integration. It should work on any of the resin.io supported devices, you just need to make sure i2c is enabled in the kernel and know the i2c bus number for you device. For some of our boards, this is done automatically, take a look at setup-i2c.sh for more info.

To get this project up and running, you will need to signup for a resin.io account here and set up a device, have a look at our Getting Started tutorial. Once you are set up with resin.io, you will need to clone this repo locally:

$ git clone https://github.com/resin-io-playground/i2c-nodejs.git

Then add your resin.io application's remote repository to your local repository:

$ git remote add resin username@git.resin.io:username/myapp.git

and push the code to the newly added remote:

$ git push resin master

It should take a few minutes for the code to push.