Setting SERVO12_FUNCTION to 94 and running this basic LED test script:
local num_leds = 4
local vez = 0
chan = SRV_Channels:find_channel(94)
if not chan then
gcs:send_text(0, "LEDs: channel not set")
chan = chan + 1
gcs:send_text(0, "LEDs started.")
serialLED:set_RGB(chan, 1, 255, 255, 255)
return update_LEDs, 500
return update_LEDs, 500
I have attempted removing the variables and hard coding it but get the same error. It is very frustrating to debug as I can only see part of the error message!
As an aside, I was hoping to use the beta Mission Planner and MavFTP to upload my Lua scripts (instead of manually moving them across to the scripts folder in the SD card), however these are the only folders it gives me:
I also keep coming across a problem with the beta version of Mission Planner whereby when connecting to the Pixhawk it gets stuck going through ‘Already Got param’ parameters?
@iampete I tried uploading the hello_world and LED_roll lua scripts from that link to the Pixhawk and both seemed to work straight away! The LED strip goes a solid green. I no longer see those ‘Lua: No scripts to run’ messages either. I will have to study the files more carefully!
@Webillo In the documentation and in the LED_roll example I just uploaded they don’t include a channel, so I am not sure if they changed it? I am running on channel 12 luckily but hadn’t realised you had to assign a channel for Neopixels?
Both of these things are in master but have not made it to stable yet
It is not currently possible to have some of the leds in one strip be NTF and others be scripting, really you need to use a different group other wise the send from the notify and scripting clash and send before the other is ready.
Hopefully we can fix this by making the notify rgb color available to scripting, then you can read out the notify color into the script and set them that way.
I was planning on having the two back strips controlled by a lua script and connected to one AUX channel whilst the front two strips are NTF LEDs and are controlled by a separate channel, so that should work fine for me! But it would be great if the NTF colour was made available for Lua scripting.
Is it possible for me to update my Arducopter to the master branch to get these features?
yep, cntrl + q on the mission planner load firmware screen, the notify length param should be coming to the next beta release. Note that the master firmware is less well tested so there might be bugs and it might do unexpected things