Skip to content

Instantly share code, notes, and snippets.

@edgarsilva
Last active August 29, 2015 14:15
Show Gist options
  • Save edgarsilva/e7a68ff241f1bfbe22e3 to your computer and use it in GitHub Desktop.
Save edgarsilva/e7a68ff241f1bfbe22e3 to your computer and use it in GitHub Desktop.
Corrected Maxbotix example.
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