praneshkmr / node-lsm303

Node.js Library for LSM303
MIT License
7 stars 7 forks source link

Magnetometer and Temperature never change #12

Closed scramble45 closed 7 years ago

scramble45 commented 7 years ago

Any ideas why the Magnetometer and the temp sensor values never change?

Results:

Accel: { x: -1.9, y: -1.9, z: -1.9 }
Mag: { x: 0, z: 0, y: 0 }
Non-Tilt-Comp-Heading: 270
Temp: { temp: 18 }
Accel: { x: -1.8, y: -1.8, z: -1.8 }
Mag: { x: 0, z: 0, y: 0 }
Non-Tilt-Comp-Heading: 270
Temp: { temp: 18 }

Only modifications I made to the module was changing the location of where my lsm303c lives on the i2c.

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- 1d 1e --
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

'1d' is the accel '1e' is the mag

'20' is a GPIO expander

https://learn.sparkfun.com/tutorials/lsm303c-6dof-hookup-guide