Page 1 of 1

Cannot communicate with FXOS8700CQ sensor over I2C

Posted: Mon Nov 27, 2017 9:43 pm
by usinjin
Hello all,

I'm fairly new to working with I2C, so bear with me if I am a little slow in figuring things out.

I have an ESP-32S WROOM32 module and I'm trying to read accelerometer/magnetometer values from a FXOS8700CQ. The sensor is on the The NXP Precision 9DoF breakout board (from Adafruit). I added 2 pullup resistors (9k) to the SCL and SDA lines. The example code for reading the FXOS8700CQ sensor from an Arduino works nicely. Previously I had been using a ADXL345 sensor connected in the exact same manner to the ESP and it worked perfectly. I tried to adapt that code to work with the FXOS8700CQ, and that's where I'm stuck. Somehow, when I write the address of the FXOS8700CQ to the bus for the first time (sensors.c, in the initACC() function, attempting to set up the sensor range, power state, etc), it's incorrect or somehow the sensor was not initiated properly. I don't think the address is wrong, but I'm not sure what is. What am I doing wrong?

Re: Cannot communicate with FXOS8700CQ sensor over I2C

Posted: Sun Mar 11, 2018 12:29 am
by kolban
When trying to solve I2C based puzzles, I can't work without a $10 logic analyzer connected to my PC. This allows me to sense the data and clock lines and get a visualization of what is happening under the covers. I'd recommend plugging one of those into your story and examining the results.