Closed ShuffleWire closed 1 year ago
Hello !
I'm not sure where to ask it, so here I go :)
I'm playing with the LIS3MDL, and for experiment and learning purpose, rewriting the i2c communication. (I've used this library initially, and checked that the chip work ok, and it did :) )
I've just successfully sent WHO_AM_I, and got the expected answer 0x40 (0b01000000), as found in the datasheet. But, as reading your code here : https://github.com/adafruit/Adafruit_LIS3MDL/blob/00d0ce39b238bab703000d7fdda47d8bc3e512dd/Adafruit_LIS3MDL.cpp#L117 you seems to check against 0x3D. Why is that, and why is it working ? :/ I'm not very skilled in i2c, so I might not understand something !
Thank for your reply, it will be for sure very informative
0x3D = 0b00111101 which is the expected value from the datasheet:
0x3D
0b00111101
Oh ! I got the LIS2MDL ! Sorry for the inconvenience !
Hello !
I'm not sure where to ask it, so here I go :)
I'm playing with the LIS3MDL, and for experiment and learning purpose, rewriting the i2c communication. (I've used this library initially, and checked that the chip work ok, and it did :) )
I've just successfully sent WHO_AM_I, and got the expected answer 0x40 (0b01000000), as found in the datasheet. But, as reading your code here : https://github.com/adafruit/Adafruit_LIS3MDL/blob/00d0ce39b238bab703000d7fdda47d8bc3e512dd/Adafruit_LIS3MDL.cpp#L117 you seems to check against 0x3D. Why is that, and why is it working ? :/ I'm not very skilled in i2c, so I might not understand something !
Thank for your reply, it will be for sure very informative