Responsive and fast control of neopixel

Firmware/software/electronics/mechanics
Post Reply
EhsanKia
Beginner
Posts: 2
Joined: Wed Jun 18, 2014 7:03 pm

Responsive and fast control of neopixel

Post 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?
EhsanKia
Beginner
Posts: 2
Joined: Wed Jun 18, 2014 7:03 pm

Re: Responsive and fast control of neopixel

Post 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.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Responsive and fast control of neopixel

Post 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!
Post Reply