ZX Gesture Sensor and ESP8266 Board

Hello!

I love my ZX gesture sensor, and it works perfectly with my blackboard, I have never had any problems with it. However, now I am doing a project with an ESP8266 board, (and hopefully will transition to an ESP32) and I cannot get any of the example code to work. When I upload the I2C_XZ demo, I get the error:

"Error reading model version number

Model version needs to be 1 to work with this library. Stopping."

To combat this, I originally thought it was a problem with the board finding the I2C connection. But when I ran code to find any I2C connection, the board can find them at the correct location (GPIO4, GPIO0 -I2C device found at address 0x10).

So I am not sure why I am getting this error. Any help would be greatly appreciated!

Hi dWinks,

Which ESP8266 board are you trying to use the ZX Distance and Gesture Sensor with? I had no issues when testing that example with one of SparkFun’s [ESP8266 Thing - Dev Boards. The only difference I can see at the moment is the Thing Dev has different I/O pins defined for SDA and SCL.

It should not be an issue, especially if you are seeing the board on your I2C bus when running a scan, but try editing the [ZX_Sensor.cpp file at the line that link points to and define your SDA and SCL pins in the Wire.begin() function. That might help resolve the issue. Otherwise, it could be a connection or power problem.](ZX_Gesture_Sensor_SMD/Libraries/Arduino/src/ZX_Sensor.cpp at master · sparkfun/ZX_Gesture_Sensor_SMD · GitHub)](https://www.sparkfun.com/products/13711)

I was using the Node ESP8266 just from Amazon. Going into the ZX_Gesture.cpp file and defining the SDA and SCL pins worked! Then I switched to the ESP32 “DOIT” board, and that worked perfectly with the demo code, no modifications.

Thank you so much for your help!