Skip to content

napo0703/door-open-iota

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-linda-door-open-iota

Open [Iota411](http://gyazz.com/masuilab/慶應SFC 増井研究会) door with linda

  1. watch {type: "door", cmd: "open"}
  2. open door
  3. then, write {type: "door", cmd: "open", response: "success"}

Dependencies

Install Dependencies

% npm install

Setup Arduino

Install Arduino Firmata v2.2

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

servo motor -> digital pin 9

Run

% npm start

=> http://node-linda-base.herokuapp.com/test?type=door

Run with your linda-base

% export LINDA_BASE=http://node-linda-base.herokuapp.com
% export LINDA_SPACE=iota
% export ARDUINO=/dev/cu.usbserial-device
% npm start

Install as Service

% gem install foreman

for launchd (Mac OSX)

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

for upstart (Ubuntu)

% sudo foreman export upstart /etc/init/ --app node-linda-door-open-iota -d `pwd` -u `whoami`
% sudo service node-linda-door-open-iota start

About

open Iota411 door

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •