Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to develop I2C driver on AI-deck #410

Open
mfxjx000205 opened this issue Feb 3, 2024 · 1 comment
Open

How to develop I2C driver on AI-deck #410

mfxjx000205 opened this issue Feb 3, 2024 · 1 comment

Comments

@mfxjx000205
Copy link

Hi,

In the past few weeks of development, I've run into a very tricky problem. Since the Crazyflie 2.1 flight control board is weak in terms of arithmetic and memory, our work hopes to make some of the expansion boards with sensors independent. Driven only by the ai-deck without going through crazyflie.

Based on the above idea, we did the following:

As this page shows, we referenced ETH-Zurich's github to make an identical piece of tof-deck. The tof-deck is a ranging expansion board consisting of two vl53l5cx sensors, and a TCA6408 I2C expander, capable of communicating with other devices via an I2C interface. Colleagues who are familiar with multiranger-deck should not need much introduction.

We used the driver code from the page above and the tof-deck was driven quite correctly on crazyflie. So, we wanted to drive the tof-deck directly, via I2C, on the AI-deck, and that's where we hit a roadblock.

a) We connect the I2C interface of the tof-deck, to the I2C interface of the AI-deck, SDA to pin R8 (SPARE_I2C_SDA), SCL to pin R9(SPARE_I2C_SCL).

b) We refer to the I2C example function in gap_sdk and want to test whether AI-deck can directly drive tof-deck. The expected way to test this is to modify the value of a register on a TCA6408.

c) The results of the test are unsatisfactory; no matter what method we use, the bus always reads 255, which is 11111111. According to the operating principle of I2C, the data bus is always high when it is not started. This should be the bus not starting.

We want to ask that regarding this need of ours, if you have any further development suggestions.

Best Wishes!

Hanjie.

@gwtsivasiva
Copy link
Contributor

gwtsivasiva commented Feb 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants