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

Question about i2c communication between crazyflie 2.0 and other chips #241

Closed
cduan2 opened this issue Jul 8, 2017 · 1 comment
Closed
Milestone

Comments

@cduan2
Copy link

cduan2 commented Jul 8, 2017

Hi,

This is Chenghao. I am currently working with the crazyflie 2.0 and trying to write the code establishing an I2C connection between it and a raspberry pi zero. I wonder how should I call my code in the main and do I need to modify the current code you have for the I2C.

Also suggestions are welcome.

Thanks for your help.
Chenghao

@ataffanel
Copy link
Member

Hi,

I would suggest you write a deck driver, this is the easiest way to get your code to be initialized and run by the Crazyflie.

There is already a couple of deck driver using I2C for communicating with sensors that you could look for example: https://github.com/bitcraze/crazyflie-firmware/blob/master/src/deck/drivers/src/vl53l0x.c.

Though, if your plan is to have the raspberry pi as master and the Crazyflie as slave it might require a lot of work to get it to play nice with the Crazyflie STM32 I2C implementation: the I2C port on Crazyflie is already setup as master to read the I2C memory that is on the same bus, you would need to reconfigure the bus in slave.

Unless your plan is to have the raspberry pi as slave, it would be much easier to use a serial port between the raspberry pie and the Crazyflie.

If you post on the forum (https://forum.bitcraze.io/) with a bit more information about what you want to achieve, we could come up with some mode guidance about how to go forward.

@krichardsson krichardsson added this to the next-version milestone Nov 16, 2017
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

3 participants