Giter Site home page Giter Site logo

crazyflie-firmware's Introduction

Bitcraze Crazyflie 2.0/2.1 Firmware

This repository contains the source code for the Bitcraze Crazyflie 2.0/2.1 utilizing ARM Mbed OS.

Programming

Below are step by step instructions to program the Bitcraze Crazyflie 2.0/2.1.

A) Fork

The first step is to fork this repository, which means to create a copy of this repository in your own GitHub account:

  1. Click on Fork

B) Import

After you have forked the repository, you should import it to Mbed Studio, an IDE designed specific for ARM Mbed OS (Windows/Mac/Linux):

  1. Install and open Mbed Studio
  2. Click on File>Import Program...
  3. Paste https://github.com/user_name/crazyflie-firmware/ under URL and then click Add Program

Don't forget to change user_namewith your GitHub username.

C) Target

Next step is to set the target you'll be utilizing, that's it, the microcontroller you will be developing for. The microcontroller from Bitcraze Crazyflie 2.0/2.1 (STM32F405RG) is not available for ARM Mbed OS. However, the microcontroller from Seeed Arch Max development board (STM32F407VE) is very similar and can be utilized with little adjustments:

  1. Click on Target and choose Seeed Arch Max (ARCH-MAX)
  2. Navigate to file mbed-os > targets > TARGET_STM > TARGET_STM32F4 > TARGET_STM32F407xG > device > TOOLCHAIN_ARM_STD > STM32F407xx.sct and modify the code of line 9:

#define MBED_APP_START 0x08004000

  1. Navigate to file mbed-os > targets > TARGET_STM > TARGET_STM32F4 > TARGET_STM32F407xG > TARGET_ARCH_MAX > PeripheralPins.c and add a line of code between lines 135 and 136:

{PB_11, PWM_2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM2_CH4

D) Build

Now you're ready to build your program, in other words, to create an binary file from your source code:

  1. Click on Build program

E) Flash

Last step is to send this binary file to your microcontroller, which is called flash. This can be done wirellesly with the Bitcraze Crazyradio PA, an USB radio dongle, and the crazyflie-clients-python, an PC client:

  1. Install crazyflie-clients-python
  2. Plug in the Bitcraze Crazyradio PA
  3. Put the Bitcraze Crazyflie 2.0/2.1 in program mode:
  • Turn off the drone
  • Hold down the push button for about 1 second until you the blue led starts blinking
  • Release the push button button
  1. Open console (CRTL+`)
  2. Change directory to where the project is located (type cd crazyflie-firmware in the console)
  3. Send the binary file to the drone (type make flash in the console)

Source code

The source code is organized as follows:

./                                | Root
 main.cpp                         | Main program
 + programs                       | Program files
 |  + examples                    | Examples
 |  + labs                        | Labs
 + src                            | Source files
 |  + drivers                     | Sensor drivers
 |  + modules                     | Controller modules
 |  + utils                       | Utility files
 + mbed-os                        | ARM Mbed OS library (automatically imported)
 + USBDevice                      | USB Device library (automatically imported)

crazyflie-firmware's People

Contributors

fbobrow avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.