iSpindel returns NaN degrees (mpu6050 does not seem to work)

Hi,

I bought an iSpindel with the intention of using it with Home assistant by using Alexander Strotmanns adaptation for ESPHome: GitHub - alsFC/esphome-iSpindel: iSpindel for ESPHome

It uses an mpu6050 to calculate an angle of the device while floating in a liquid.

I’ve installed it now, but the accelerometer returns NaN% in the log, and subsequently, I cant use it.

I imagine it could be the addressvariable for the mpu6050 that is causing issues. The documentation says to “Manually specify the I²C address of the sensor. Defaults to 0x68 .” MPU6050 Accelerometer/Gyroscope Sensor — ESPHome

But how do I find out what the address should be? What else could be the issue?

I am using the pcb version 2.69

1 Like

Scan will show it in the log.

For future readers, the answer is quite simple. The version I mention above uses an old version of the PCB.

If you use the current version (2.69) you need to update the pin mapping like this:

# i2c configuration

i2c:
  sda: D3
  scl: D4
1 Like

Thanks, Nick

I have the 2.69 PCB, and am trying to integrate it in ESPHome.
Voltage and percent are correct, but angles are shown as -nan.
I gues the challenge is that I am required to use GPIO# rather than D3/D4.
Any idea how they translate?

That depends on your Esp module. If it’s d1 mini, D3/D4 would be GPIO0 and GPIO2.

Works. Thanks