Products
-
-
- Accessories
- Breakout boards
This is an old revision of the document!
This howto is going to describe step-by-step how to make and flash your first Crazyflie 2.0 deck driver.
You should have the crazyflie-firmware and crazyflie-clients-python cloned in the same folder. If you are using the Bitcraze VM this is already the case.
For the rest of the howto you will work in the crazyflie-firmware project.
Deck drivers are in the deck/driver/src folder. Create this file named hello.c in the deck/driver/src folder:
#define DEBUG_MODULE "HelloDeck" #include "debug.h" #include "deck.h" static void helloInit() { DEBUG_PRINT("Hello Crazyflie 2.0 deck world!\n"); } static bool helloTest() { DEBUG_PRINT("Hello test passed!\n"); return true; } static const DeckDriver helloDriver = { .name = "myHello", .init = helloInit, .test = helloTest, }; DECK_DRIVER(helloDriver);