Question on integrating custom sensor on Crazyflie 2.0

Firmware/software/electronics/mechanics
Post Reply
prasgane
Beginner
Posts: 2
Joined: Mon Aug 07, 2017 11:56 pm

Question on integrating custom sensor on Crazyflie 2.0

Post by prasgane »

Hi,

I am currently developing a driver for integrating an accelerometer to the Crazyflie 2.0 through I2C. I just wanted to know what the best way to do this was. I am struggling to find the difference between adding the sensor using the Deck and the Deck API vs just soldering it to the pins. Does using the Deck API require me to buying an Expansion Board?

Thank you
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Question on integrating custom sensor on Crazyflie 2.0

Post by tobias »

I would recommend using the deck API, it is not complete but simplifies development a lot. There is a howto you can use to get started and you don't need a breakout deck, you just need to force the driver.
prasgane
Beginner
Posts: 2
Joined: Mon Aug 07, 2017 11:56 pm

Re: Question on integrating custom sensor on Crazyflie 2.0

Post by prasgane »

Hi Tobias,

Thank you for your reply. I went ahead and tried to implement the code example on the page you had shared with an expansion deck I found in my lab and I was not able to get the messages to confirm that the driver was compiled and registered. Could you please help me out; What do you mean by " you just need to force the driver"? Do I need to make some hardware changes to the expansion deck for the CF to recognize the OW (I tried attaching it both to the top and bottom but neither worked)?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Question on integrating custom sensor on Crazyflie 2.0

Post by arnaud »

Hi, I can jump-in since I wrote this tutorial.

Following the tutorial does not require any hardware to be attached. By forcing the deck driver we mean following this part: https://wiki.bitcraze.io/doc:crazyflie: ... the_driver. If your driver is not registered maybe it has not been compiled in the firmware? Also, when changing the config.mk file, make sure to clean the project and recompile it completely (make clean).

The system is done in such a way that a deck driver can be automatically enabled when a deck OW memory is detected. Though for development you will very often not have a OW memory on your deck (we usually don't) so in that case you can force the Crazyflie to enable the deck driver. In the futur if you have the need to make your deck generic and plug-and-play you can add a one wire memory to it, though this is not mandatory since the deck driver can be forced.
Post Reply