examples/hmc6352/fluent-hmc6352.js
"use strict";
var Cylon = require("cylon");
Cylon
.robot()
.connection("arduino", { adaptor: "firmata", port: "/dev/ttyACM0" })
.device("hmc6352", { driver: "hmc6352" })
.on("ready", function(bot) {
setInterval(function() {
bot.hmc6352.heading(function(err, data) {
console.log(err || "heading: " + data);
});
}, 1000);
});
Cylon.start();