Skip to content
This repository has been archived by the owner on May 30, 2018. It is now read-only.

💾 Control your Arduino with Node

Notifications You must be signed in to change notification settings

kyungw00k/node-arduino

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Arduino

This package is designed to allow you to control and program an arduino chipset with JavaScript. It leverages the node-serialport code base, so ensure that you have that installed. In order to see what this package can do, please watch this presentation from JSConf EU 2010 by Nikolai Onken and Jörn Zaefferer.

How To Use

Using node-arduino is pretty easy because it is pretty basic. It is essentially a wrapper with arduino specific message handling around the node-serialport library.

To Install

npm install git://github.com/kyungw00k/node-arduino.git

To Use

  • Opening an arduino board:
var arduino = require("arduino") 
  , myBoard = arduino.connect("/dev/tty-usbserial1");
  • Getting pin 7 digital value
var arduino = require("arduino")
  , myBoard = arduino.connect("/dev/tty-usbserial1");

myBoard.pinMode(7, arduino.INPUT);

setInterval(function () {
  myBoard.digitalRead(7, function(data) {
	console.log(data);
  });
}, 100);

About

💾 Control your Arduino with Node

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 68.1%
  • Java 31.9%