Skip to content

Instantly share code, notes, and snippets.

View joshmarinacci's full-sized avatar
💭
energized

Josh Marinacci joshmarinacci

💭
energized
View GitHub Profile
var SerialPort = require('serial-port');
var sp = new SerialPort('/dev/ttyUSB0');
sp.on('open', function() {
sp.write('<ID01><PA>', function(err, res){
if(!err) {
sp.write('<ID01><PA>$1', function(err, res) {
if(!err) {
console.log("yay!");
}