flight automation

Firmware/software/electronics/mechanics
Post Reply
Sahildeep
Beginner
Posts: 7
Joined: Tue Mar 24, 2015 4:43 am

flight automation

Post by Sahildeep »

hi
i am a student and i want to make crazyflie to fly in the air without any controller and the problem i am getting that i am not able to figure out what variables in the firmware used for what and how to define pins in the coding part and in which .c file in order to add some different sensors to the crazyflie and also want to know can i control the flight movement through logs and parameters or i need to write code for that in the stabilizer.c

and also can you tell me brief about other .c files and the variables used with logs and parameters

thank you
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: flight automation

Post by arnaud »

Hi,

To add sensors to the Crazflie you will have to use the STM32 API to access pins and peripherals (we are planing an easier-to-use API but it is not there yet). The basic workflow would be to make a driver for the sensor and then make a .c file in the module/ folder to use the driver and comunicate with the outside world using mainly log and param.

For example you can look at how the buzzer has been added: https://github.com/bitcraze/crazyflie-f ... c/buzzer.c We made a driver called "piezo" and then we made buzzer.c that uses the driver and do useful things and then buzzerInit is called from system.c to be launched at startup: https://github.com/bitcraze/crazyflie-f ... tem.c#L145

To control the copter you have to modify stabilizer.c, we have no easy way to access the control in a modular way from inside the Crazyflie yet, Any idea are welcome! (maybe we can make commander.c capable of accepting setpoint values from the firmware).

What kind of sensor do you want to install? This could help to pinpoint how to interface it.
Greensprings
Member
Posts: 30
Joined: Sat Feb 07, 2015 11:32 pm

Re: flight automation

Post by Greensprings »

are you thinking gps, and maybe waypoint following or return to launch
Sahildeep
Beginner
Posts: 7
Joined: Tue Mar 24, 2015 4:43 am

Re: flight automation

Post by Sahildeep »

i am thinking of using long range infrared sensors to detect its surroundings to react. And also can you tell me about different variables used in stabilizer.c what values/information they hold and used for because there are plenty of variables in stabilizer.c and is it possible to write values of different variables used into a file in the computer.
Post Reply