Hi there,
I currently have an arduino controlling nav lights on my X8 drone. It’s a very big drone so it has about 80leds on each arm!
Currently the arduino is disconnected from the FC and is just showing red and green with a white strobe.
What is like is to connect it to the FC so that for example:
Armed is red and green with white strobe
Ready to arm is Purple
Error is flashing red
Fail safe is strobe red/white
These color don’t matter as I can figure that out later but what I’m stuck on is how to get the status of the craft from the FC? And how would I link a status with a led color.
I’m new to code but not new to ardu pilot and drones
Forgot to mention, the LEDS i’m using are RGBW which im fairly certain AP doesn’t support. also doesn’t AP have a led limit? something like 33? I have about 320 lol.
If they aren’t supported, use a serial or I2C connection to communicate with your microcontroller from a similar Lua script as the ones I’ve linked.
There isn’t much of a limit other than the current limit, which is what I suspect you’re reading someplace. Don’t power your strips from the autopilot’s 5V regulator, and you avoid that.
It’s a hardware communication protocol. Google is your friend there.
If you don’t want to set up byte-wise comms, you can also craft your script to output RC PWM to an otherwise unused servo pin and use your microcontroller to read it. Assign meaning to various pulse widths as you see fit.