Hi,
I am trying to add a sensor which would send the data back to crazyflie via the I2C bus so I wrote a deck driver. After I connected the cables (sensor SDA->crazyflie SDA, sensor SCL->crazyflie SCL), the crazyflie couldn't start normally(only two blue LEDs light solidly). There were two times I actually got it started and console showed "EEPROM: I2C connection [FAIL]" and I couldn't get the data from my sensor.

Is that because of my connection that made the EEPROM I2C connection fail? And are there any built-in pull up resistors for the crazyflie I2C bus?

it does look like your connections are disturbing the I2C bus, the configuration EEPROM in the Crazyflie is connected to the deck-port I2C bus and so yes there is pull-ups in the Crazyflie on this I2C bus. You can look at the schematic if you want to see more precisely how things are cabled: https://wiki.bitcraze.io/_media/project ... matics.pdf.

Since you are calling systemWaitStart() in your driver, you are not affecting the boot of the system so the driver is most likely not causing that problem.

it does look like your connections are disturbing the I2C bus, the configuration EEPROM in the Crazyflie is connected to the deck-port I2C bus and so yes there is pull-ups in the Crazyflie on this I2C bus. You can look at the schematic if you want to see more precisely how things are cabled: https://wiki.bitcraze.io/_media/project ... matics.pdf.

Since you are calling systemWaitStart() in your driver, you are not affecting the boot of the system so the driver is most likely not causing that problem.

Thank you, arnaud. But I can sure that my connection is right as it is so straightforward. I couldn't figure out where the problem would be.

Can you test with the stock firmware to start the Crazyflie with and without your connections, that would verify if the problem is there or not.

If it is, it would be useful to look at the signals with an oscilloscope to see what goes wrong with it. Are you attaching long cables or extra capacitor/resistors to the lines? Are you sure the I2C address of that you are attaching is not in collision with the I2C EEPROM?

Can you test with the stock firmware to start the Crazyflie with and without your connections, that would verify if the problem is there or not.

If it is, it would be useful to look at the signals with an oscilloscope to see what goes wrong with it. Are you attaching long cables or extra capacitor/resistors to the lines? Are you sure the I2C address of that you are attaching is not in collision with the I2C EEPROM?

It turned out it might be the problem of the sensor. I change the sensor and the EEPROM problem is solved. But now all the values read by the crazyflie are 0 and I guess I might never truly read the data from the sensor. I used exact the same connection to the arduino and the arduino can read the values.

It turns out that my I2C sensor didn't respond to the "write" command. But I have set it to "I2CDEV_NOMEM_ADDR" and crazyflie should directly send read command instead of sending write command at first. Whatever, I fixed the sensor to make it be able to respond to the write command. After the write command is acknowledged, crazyflie finally started to send read command and my sensor responded to it. I can see the SDA channel actually had data flowing through. However, the "i2cdevreadbyte" function in the crazyflie still returned a "false" and no data was stored to the variable set to receiving the data.

It turns out that except the built-in pull up resistors, an external 10k resistor is also needed for SDA and SCL. After adding the external pull-up resistors, the program works and I can get the data from my sensor.