Skip to content

Latest commit

 

History

History
62 lines (36 loc) · 1.44 KB

README.md

File metadata and controls

62 lines (36 loc) · 1.44 KB

arduino-sensor

Share Arduino's sensor values with linda-socket.io

Install Dependencies

% npm install

Setup Arduino

Install Arduino Firmata v2.2

Arduino IDE -> [File] -> [Examples] -> [Firmata] -> [StandardFirmata]

sensors

  • light
    • analog input 0
    • CdS and 330Ω
  • temperature

schema

arduino schema

Run

% npm start

=> http://linda-server.herokuapp.com/test?type=sensor

Run with your linda-server

% export LINDA_BASE=http://linda-server.herokuapp.com
% export LINDA_SPACE=test
% export ARDUINO=/dev/cu.usbdevice-name
% npm start

Install as Service

% gem install foreman

for launchd (Mac OSX)

% sudo foreman export launchd /Library/LaunchDaemons/ --app node-linda-arduino-sensor -u `whoami`
% sudo launchctl load -w /Library/LaunchDaemons/node-linda-arduino-sensor-main-1.plist

for upstart (Ubuntu)

% sudo foreman export upstart /etc/init/ --app node-linda-arduino-sensor -d `pwd` -u `whoami`
% sudo service node-linda-arduino-sensor start