Hello everyone.
This is a post after this first one (you dont need to read it):
What I’m trying to do ?
Connect a WS2812 capable matrix led to my flight controler and manipulate it thanks to lua scripting provided with ArduPilot.
I’ve flashed my flght controler with ardupilot and perform all sensors checks, thanks to QGroundControl. My quad is almost ready to fly, I just want to add a matrix led on it and control it’s behaviour thanks to lua scripting.
After reading the documentation, I’ve understood that SERVOn_FUNCTION are parameters available to control the behaviour of SERVO outputs, wich makes possible to use extra ports unused for motors to control other output. Functions are listed on the documentation, and regarding lua scripts it looks like it should be set to 94. Because I’m trying to use my MAIN OUT 6, I’ve set my SERVO6_FUNCTION to 94 here
(I’ve already set SCR_ENABLE to 1)
Then I’ve put the following script inside my APM/scripts folder
The only modification I’ve made on the script is replacing “gcs:send_text(6” by “gcs:send_text(0” to make sure to see them inside “messages” panel on Mission Planer.
I’ve opened up my “messages” panel on Mission Planer and when I plug my quad with my liPo battery and then “connect” my Mission Planer to the drone port, I can see the debug line “LEDs: chan=6” Wich looks great for me ! It appears that the lua script I’ve found the correct MAIN OUT port where my matrix led is wired !
However, my matrix led kept light off
Here are more pictures about the wiring part
(on the Pixhawk MAIN OUT 6)
(to the Matrix Led ws2812 compatible)
I’ve also set NTF_LED_TYPES like this:
I don’t understand why the matrix led stays off. Should it powered from an other source ? I’ve also tried to set (temporarly) SERVO6_FUNCTION to 33 (motor 1) and have set SERVO1_FUNCTION to 0 (disable) and perform an arm action. The motors 2, 3, and 4 have spinned as expected, but I believed that it should powered on the WS2812 matrix but it didn’t !
I hope you can help me here and wich you a happy new year !