Last active
August 29, 2015 14:15
-
-
Save edgarsilva/e7a68ff241f1bfbe22e3 to your computer and use it in GitHub Desktop.
Corrected Maxbotix example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Cylon = require('cylon'); | |
Cylon.robot({ | |
connections: { | |
edison: { adaptor: 'intel-iot' } | |
}, | |
// should be one of the analog pins from 0 to 5 | |
// if using the arduino shield. | |
devices: { | |
maxbotix: { driver: 'maxbotix', pin: '1' } | |
}, | |
work: function(my) { | |
every((1).seconds(), function() { | |
my.maxbotix.range(function(data) { | |
console.log("range: " + data); | |
}); | |
}); | |
} | |
}).start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment