Skip to content

donaldaverill/meteor-app-example-arduino-serialport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meteor to Arduino using serialport

An example Meteor app showing communication with an Arduino Uno. This project uses the meteor-package-serialport meteor package, which is serialport repackaged for Meteor.

Be sure to plug in your Arduino to the serial port of your computer before starting meteor. The Arduino file for this project is included in this repository here. Upload it to your device and change the path:

var serialPort = new SerialPort.SerialPort("/yourPath", {
    baudrate: 9600,
    parser: SerialPort.parsers.readline('\r\n')
});

Once you start meteor, you should be able to turn on and off the LED on the Arduino board from a button on the app, which should also change from red(off) to green(on).

An alternative to using the meteor-serial package is to use the serialport node package via npm. To do so, change this:

var serialPort = new SerialPort.SerialPort("/yourPath", {
    baudrate: 9600,
    parser: SerialPort.parsers.readline('\r\n')
});

to:

var SerialPort = Meteor.require('serialport');
var serialPort = new SerialPort.SerialPort("/yourPath", {
    baudrate: 9600,
    parser: SerialPort.parsers.readline('\r\n')
});

This example has been updated to Meteor 1.1 and Meteor Streams has been removed since it has been deprecated.

About

An example Meteor app to communicate with an Arduino Uno with node-serialport

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages