diff --git a/sdcard/bw128x64/SCRIPTS/RGBLED/blue.lua b/sdcard/bw128x64/SCRIPTS/RGBLED/blue.lua new file mode 100644 index 00000000..9e45f97e --- /dev/null +++ b/sdcard/bw128x64/SCRIPTS/RGBLED/blue.lua @@ -0,0 +1,16 @@ +local function init() +end + +local function run() + for i=0, LED_STRIP_LENGTH - 1, 1 + do + setRGBLedColor(i, 0, 0, 50) + end + applyRGBLedColors() +end + +local function background() + -- Called periodically while the Special Function switch is off +end + +return { run=run, background=background, init=init } diff --git a/sdcard/bw128x64/SCRIPTS/RGBLED/green.lua b/sdcard/bw128x64/SCRIPTS/RGBLED/green.lua new file mode 100644 index 00000000..19308577 --- /dev/null +++ b/sdcard/bw128x64/SCRIPTS/RGBLED/green.lua @@ -0,0 +1,16 @@ +local function init() +end + +local function run() + for i=0, LED_STRIP_LENGTH - 1, 1 + do + setRGBLedColor(i, 0, 50, 0) + end + applyRGBLedColors() +end + +local function background() + -- Called periodically while the Special Function switch is off +end + +return { run=run, background=background, init=init } diff --git a/sdcard/bw128x64/SCRIPTS/RGBLED/off.lua b/sdcard/bw128x64/SCRIPTS/RGBLED/off.lua new file mode 100644 index 00000000..ec63dcc4 --- /dev/null +++ b/sdcard/bw128x64/SCRIPTS/RGBLED/off.lua @@ -0,0 +1,16 @@ +local function init() +end + +local function run() + for i=0, LED_STRIP_LENGTH - 1, 1 + do + setRGBLedColor(i, 0, 0, 0) + end + applyRGBLedColors() +end + +local function background() + -- Called periodically while the Special Function switch is off +end + +return { run=run, background=background, init=init } diff --git a/sdcard/bw128x64/SCRIPTS/RGBLED/police.lua b/sdcard/bw128x64/SCRIPTS/RGBLED/police.lua new file mode 100644 index 00000000..07dea0d2 --- /dev/null +++ b/sdcard/bw128x64/SCRIPTS/RGBLED/police.lua @@ -0,0 +1,26 @@ +local function init() + police_oldtime = getTime() + police_cycle = 0 +end + +local function run() + for i=0, LED_STRIP_LENGTH - 1, 1 + do + if (i % 2 == police_cycle) then + setRGBLedColor(i, 0, 0, 50) + else + setRGBLedColor(i, 50, 0, 0) + end + end + if ((getTime() - police_oldtime) > 8) then + police_oldtime = getTime() + police_cycle = 1 - police_cycle + end + applyRGBLedColors() +end + +local function background() + -- Called periodically while the Special Function switch is off +end + +return { run=run, background=background, init=init } diff --git a/sdcard/bw128x64/SCRIPTS/RGBLED/red.lua b/sdcard/bw128x64/SCRIPTS/RGBLED/red.lua new file mode 100644 index 00000000..05e8bd59 --- /dev/null +++ b/sdcard/bw128x64/SCRIPTS/RGBLED/red.lua @@ -0,0 +1,16 @@ +local function init() +end + +local function run() + for i=0, LED_STRIP_LENGTH - 1, 1 + do + setRGBLedColor(i, 50, 0, 0) + end + applyRGBLedColors() +end + +local function background() + -- Called periodically while the Special Function switch is off +end + +return { run=run, background=background, init=init }