0
votes

I've followed the online guides to setup the johnny-five and particle-io and I think everything is now working. if I run node process.env I can see my DEVICE_ID and DEVICE_TOKEN. I run with node the example code I found on this guide and what I get is and this is not my device ID!

I was expecting the command prompt to output the result of

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("--------------------------------------");

but I think I might be wrong? if so, where would I see the output? This is my first experience with jonny-5 and node, so sorry if it's a bit confused..

1
May I could help you if you show your code. - Henri Cavalcante

1 Answers

0
votes

I haven't worked on particle using johnny-five setup but I can guide you as to how you can get the values from your sensor MPU-6050 on particle dashboard.

You can use this code of MPU-6000 which is same as MPU-6050 you are using and flash this one on particle build and check the output on particle dashboard.

https://github.com/ControlEverythingCommunity/MPU-6000/blob/master/Particle/MPU-6000.ino

For further details as to how to do it you can also go through the video which would show depict i2c interfacing of sensor with particle and data on web dashboard.

https://www.youtube.com/watch?v=-_DfUd9Ug9w.I hope it solves your problem.