我已经按照在线指南设置了johnny-five和particle io,我想现在一切都正常了。如果我运行node process.env,我可以看到我的DEVICE_ID和DEVICE_TOKEN。我用node运行我在this指南上找到的示例代码,我得到的结果是

我期望命令提示符输出以下结果
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("--------------------------------------");但我想我可能错了?如果是这样,我将在哪里看到输出?这是我第一次使用jonny-5和node,如果有点困惑,很抱歉。
发布于 2016-04-20 16:50:47
我没有使用johnny-five设置粒子,但我可以指导你如何从粒子仪表板上的传感器MPU-6050获得值。
您可以使用此代码的MPU-6000,这与您正在使用的MPU-6050相同,并在粒子构建和检查粒子仪表板上的输出。
https://github.com/ControlEverythingCommunity/MPU-6000/blob/master/Particle/MPU-6000.ino
有关如何做到这一点的更多详细信息,您还可以查看视频,该视频将显示在web仪表板上描绘传感器与粒子和数据的i2c接口。
https://stackoverflow.com/questions/35752088
复制相似问题