Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
controller: "BMP180"
});
multi.on("change", function() {
// console.log("BMP180");
// console.log(" pressure : ", this.barometer.pressure);
// console.log(" temperature : ", this.temperature.celsius)
// console.log("--------------------------------------");
temp = this.temperature.celsius;
// var currentTime = new Date().toISOString();
// send_message(format_sensor_data(settings.guid1, settings.displayname, settings.organization, settings.location, "Temperature", "C", currentTime , this.temperature.celsius), currentTime);
});
// Initialize accelerometer
var accelerometer = new five.Accelerometer({
controller: "ADXL345"
});
accelerometer.on("change", function() {
// console.log("accelerometer");
// console.log(" x : ", this.x);
// console.log(" y : ", this.y);
// console.log(" z : ", this.z);
// console.log(" pitch : ", this.pitch);
// console.log(" roll : ", this.roll);
// console.log(" acceleration : ", this.acceleration);
// console.log(" inclination : ", this.inclination);
// console.log(" orientation : ", this.orientation);
// console.log("--------------------------------------");
acc += this.acceleration;
nbaccmeasures++ ;
board.on("ready", function() {
var accelerometer = new five.Accelerometer({
controller: "ADXL335",
pins: ["A0", "A1", "A2"]
});
accelerometer.on("change", function() {
console.log("accelerometer");
console.log(" x : ", this.x);
console.log(" y : ", this.y);
console.log(" z : ", this.z);
console.log(" pitch : ", this.pitch);
console.log(" roll : ", this.roll);
console.log(" acceleration : ", this.acceleration);
console.log(" inclination : ", this.inclination);
console.log(" orientation : ", this.orientation);
console.log("--------------------------------------");
});
board.on('ready', function() {
const accelerometer = new five.Accelerometer({
controller: 'ADXL345'
});
accelerometer.on('change', function() {
console.log('accelerometer');
console.log(' x : ', this.x);
console.log(' y : ', this.y);
console.log(' z : ', this.z);
console.log(' pitch : ', this.pitch);
console.log(' roll : ', this.roll);
console.log(' acceleration : ', this.acceleration);
console.log(' inclination : ', this.inclination);
console.log(' orientation : ', this.orientation);
console.log('--------------------------------------');
});
});
board.on('ready', function() {
const accelerometer = new five.Accelerometer({
controller: 'ADXL345'
});
accelerometer.on('change', function() {
console.log('accelerometer');
console.log(' x : ', this.x);
console.log(' y : ', this.y);
console.log(' z : ', this.z);
console.log(' pitch : ', this.pitch);
console.log(' roll : ', this.roll);
console.log(' acceleration : ', this.acceleration);
console.log(' inclination : ', this.inclination);
console.log(' orientation : ', this.orientation);
console.log('--------------------------------------');
});
});
board.on('ready', function() {
const accelerometer = new five.Accelerometer({
controller: 'ADXL345'
});
accelerometer.on('change', function() {
console.log('accelerometer');
console.log(' x : ', this.x);
console.log(' y : ', this.y);
console.log(' z : ', this.z);
console.log(' pitch : ', this.pitch);
console.log(' roll : ', this.roll);
console.log(' acceleration : ', this.acceleration);
console.log(' inclination : ', this.inclination);
console.log(' orientation : ', this.orientation);
console.log('--------------------------------------');
});
});
board.on('ready', function() {
const accelerometer = new five.Accelerometer({
controller: 'ADXL345'
});
accelerometer.on('change', function() {
console.log('accelerometer');
console.log(' x : ', this.x);
console.log(' y : ', this.y);
console.log(' z : ', this.z);
console.log(' pitch : ', this.pitch);
console.log(' roll : ', this.roll);
console.log(' acceleration : ', this.acceleration);
console.log(' inclination : ', this.inclination);
console.log(' orientation : ', this.orientation);
console.log('--------------------------------------');
});
});