WS2812B (NeoPixel) Integration

Thanks, understood.

So I started with notifying, and things began to work with latest Copter version:
25/03/2020 11:37:16 : Frame: HEXA
25/03/2020 11:37:16 : RCOut: PWM:1-8 NeoP:9-12 PWM:13-14
25/03/2020 11:37:16 : fmuv3 004B0036 3436510A 32393637
25/03/2020 11:37:16 : ChibiOS: d4fce84e
25/03/2020 11:37:16 : ArduCopter V4.0.4-dev (bfc4802b)
even not using level converters (direct connection).

I connected four 8x8 WS2812 panels on Pixhawk AUX1 to AUX4 with:
BRD_PWM_COUNT=4
NTF_LED_LEN=64
NTF_LED_OVERRIDE=0
NTF_LED_TYPES=258
SCR_ENABLE=0
SERVO9_FUNCTION=120
SERVO10_FUNCTION=121
SERVO11_FUNCTION=122
SERVO12_FUNCTION=123
and got (4K):

(Note that trying 64 leds is not for flying; there are many problems).

Pixhawk led red and WS2812 leds yellow is easy to reproduce: disconnect and connect the USB cable to a USB power bank.

Trying all the same on a Pixracer didn’t work. It reported:
25/03/2020 12:17:33 : Frame: QUAD
25/03/2020 12:17:33 : RCOut: PWM:1-6
25/03/2020 12:17:33 : ArduCopter V4.0.4-dev (bfc4802b)
25/03/2020 12:17:33 : Pixracer 004F002F 34385108 35383135
25/03/2020 12:17:33 : ChibiOS: d4fce84e
but it didn’t work (leds off) even its outputs are the same as Pixhawk AUX’s (PE14/PE13/PE11/PE9/PD13/PD14).

With that working, I tried a lua script, changing:
NTF_LED_LEN=8
SCR_ENABLE=1
SERVO9_FUNCTION=94
with the following lua script:

local num_leds = 5
local vez = 0
local chan = SRV_Channels:find_channel(94)

if not chan then
gcs:send_text(6, “LEDs: channel not set”)
return
end

– find_channel returns 0 to 15, convert to 1 to 16
chan = chan + 1

gcs:send_text(6, “LEDs: chan=” … tostring(chan))

– initialisation code
serialLED:set_num_neopixel(chan, num_leds)
–serialLED:set_num_profiled(chan, num_leds)
–serialLED:set_num_LEDs(chan, num_leds)

function update_LEDs()
serialLED:set_RGB(chan, 1, 127, 127, 127)
serialLED:send(chan)
gcs:send_text(6, “LEDs94: vez=” … tostring(vez))
vez = vez + 1
return update_LEDs, 2000 – run at 50Hz
end

return update_LEDs, 1000

obtaining on MP:
25/03/2020 12:36:21 : LEDs94: vez=6
25/03/2020 12:36:21 : Lua: Running /APM/scripts/LED_roll_test94.lua
25/03/2020 12:36:19 : Lua: Time: 190 Mem: 23789 + 373
25/03/2020 12:36:19 : LEDs94: vez=5
25/03/2020 12:36:19 : Lua: Running /APM/scripts/LED_roll_test94.lua
25/03/2020 12:36:17 : Lua: Time: 297 Mem: 23789 + 373
25/03/2020 12:36:17 : LEDs94: vez=4
25/03/2020 12:36:17 : Lua: Running /APM/scripts/LED_roll_test94.lua
25/03/2020 12:36:15 : Lua: Time: 167 Mem: 23789 + 373
25/03/2020 12:36:15 : LEDs94: vez=3
25/03/2020 12:36:15 : Lua: Running /APM/scripts/LED_roll_test94.lua
25/03/2020 12:36:13 : Lua: Time: 1758 Mem: 23789 + 373
25/03/2020 12:36:13 : LEDs94: vez=2
25/03/2020 12:36:13 : Lua: Running /APM/scripts/LED_roll_test94.lua
25/03/2020 12:36:13 : Frame: HEXA
25/03/2020 12:36:13 : RCOut: PWM:1-8 NeoP:9-12 PWM:13-14
25/03/2020 12:36:13 : fmuv3 004B0036 3436510A 32393637
25/03/2020 12:36:13 : ChibiOS: d4fce84e
25/03/2020 12:36:13 : ArduCopter V4.0.4-dev (bfc4802b)
25/03/2020 12:36:11 : Lua: Time: 166 Mem: 23789 + 373
25/03/2020 12:36:11 : LEDs94: vez=1
25/03/2020 12:36:11 : Lua: Running /APM/scripts/LED_roll_test94.lua
25/03/2020 12:36:11 : EKF2 IMU1 tilt alignment complete
25/03/2020 12:36:11 : EKF2 IMU0 tilt alignment complete

So there seems to be no problem on the two bold lines, but the panel on AUX1 (SERVO9_FUNCTION=94) was off all the time (the other three were on as before, with 8 leds each).

What am I missing to get lua script output on AUX1 and notifying on AUX2 to AUX4?