From a51e9cdf9977a490d7b83fcc85bb272e6ef6bb96 Mon Sep 17 00:00:00 2001 From: Arjen Baart Date: Sun, 3 May 2020 16:41:51 +0200 Subject: [PATCH] Startup script startpwm --- src/startpwm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 src/startpwm diff --git a/src/startpwm b/src/startpwm new file mode 100755 index 0000000..9bba7ca --- /dev/null +++ b/src/startpwm @@ -0,0 +1,28 @@ +#!/bin/bash + +# +# Start the pwm generator with real time priority. +# + +PATH=$PATH:/usr/local/bin + +# Initialize the shared memory segment. + +lightcontrol -r 0 -g 0 -b 0 -w 0 + +chrt -f 50 pwm & + + +# Create a sequence of light colors to test if the generator is working +# The sequence is red - green - blue - white. + + +lightcontrol -r 100 -g 0 -b 0 -w 0 +sleep 2 +lightcontrol -r 0 -g 100 -b 0 -w 0 +sleep 2 +lightcontrol -r 0 -g 0 -b 100 -w 0 +sleep 2 +lightcontrol -r 0 -g 0 -b 0 -w 100 +sleep 2 +lightcontrol -r 0 -g 0 -b 0 -w 0 -- 2.20.1