Page 1 of 1

Responsive and fast control of neopixel

Posted: Wed Jun 18, 2014 7:08 pm
by EhsanKia
Hello,

I have a setup with a neopixel attached to the crazyflie and I want fast control of it.
The current way it's setup, I have to set neopixel.r/g/b parameters, which change the color.
But parameters aren't supposed to be changed at such high rates, so the latency is horrible.

Is there any way to get the sort of response we get with the commander to control the neopixel?

Re: Responsive and fast control of neopixel

Posted: Fri Jun 20, 2014 7:26 pm
by EhsanKia
For anyone curious, we ended up modifying commander.c (in the firmware) and commander.py (in the python library) to send RGB data along with roll/pitch/yaw/thrust.
It was fairly simple to do. For anyone curious about more of the specifics, here is the updated files:

commander.c and commander.py

This also makes sure that the python api doesn't break already existing code.
In the firmware, you just call CommanderGetRGB() and use that to update the color of your LED.

Re: Responsive and fast control of neopixel

Posted: Mon Jun 23, 2014 11:13 am
by tobias
Yes that would be a good way to do it if you want fast update rates. The parameters are not meant for high update rates.

Cool so now you can update the neopixel over the air, nice!