Led control by Python script

Firmware/software/electronics/mechanics
Post Reply
Lucsalo
Beginner
Posts: 2
Joined: Tue Feb 15, 2022 9:20 am

Led control by Python script

Post by Lucsalo »

Hi, i'´m a student of University of L´Aquila.
I'm trying to control LEDS by using a Python script to turn them on and off as i want, is it possible?
I searched in forum, and i saw that probably it's not possible, but i would like to have your confirmation.
jonasdn
Expert
Posts: 132
Joined: Mon Mar 01, 2021 3:13 pm

Re: Led control by Python script

Post by jonasdn »

Hi Lucsaio!

It should be doable! Check out the parameter documentation for the LED group: https://www.bitcraze.io/documentation/r ... arams/#led

By controlling this parameter from Python you should be able to control the LEDs. For tutorial in setting paremters see:
https://www.bitcraze.io/documentation/r ... log_param/

Good luck!
Lucsalo
Beginner
Posts: 2
Joined: Tue Feb 15, 2022 9:20 am

Re: Led control by Python script

Post by Lucsalo »

Thank you jonasdn,

From the attached docs i understand that right parameter is led.bitmask
I tried to search it in the "tab parameters" using the crazyflie client, but i didn´t find it.
According to you, it make sense to search it there?
and, If not, do you think that the only possibility to manage it is by using a python scipt ?
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Led control by Python script

Post by kristoffer »

Hi!

The parameter should be available in the client (in the param tab) and you can set it from there or a python script if you like.

You can find an example of how to set parameters from at script in https://github.com/bitcraze/crazyflie-l ... icparam.py for example
Post Reply