Gyroscope with Particle Photon

I am trying to use the L3G4200D gyroscope with a Particle Photon. I got a code from control everything for another L3G4200D gyro with the Particle but it is not working with this Parallax gyro.
Link of the code is
https://github.com/ControlEverythingCommunity/L3G4200D/blob/master/Particle/L3G4200D.ino
I am getting outputs of X=190466, Y=107048389 and Z=644001480. It looks like an address problem but I'm not sure what the addresses are supposed to be.

Comments

  • 1 Comment sorted by Date Added Votes
  • I would check the range of results from Wire.read(). If data[] is really only supposed to be byte values, there'd be no possible way for you to get results that exceed 65535 (unsigned), so you must be getting values back that are outside the expected byte range.
Sign In or Register to comment.