Page 1 of 1

flight automation

Posted: Tue Mar 24, 2015 4:56 am
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

Re: flight automation

Posted: Tue Mar 24, 2015 11:26 am
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.

Re: flight automation

Posted: Tue Mar 24, 2015 10:30 pm
by Greensprings
are you thinking gps, and maybe waypoint following or return to launch

Re: flight automation

Posted: Sat Mar 28, 2015 4:06 am
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.