Skip to content

Commit

Permalink
treehouses led <holiday> both led output (#2153)
Browse files Browse the repository at this point in the history
Co-authored-by: RJ Padilla <rjpadilla.dev@outlook.com>
Co-authored-by: dogi <dogi@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 15, 2021
1 parent e0b57c4 commit 19a13d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions modules/led.sh
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ function led {

if [ "$color" = "green" ]; then
echo -e "$green: $newValue"
echo -e "$red: $currentRed"
elif [ "$color" = "red" ]; then
echo -e "$green: $currentGreen"
echo -e "$red: $newValue"
fi
fi
Expand Down Expand Up @@ -605,7 +607,7 @@ function labourday {
current_green=$(led "green")
current_red=$(led "red")

set_brightness 1 0
set_brightness 1 0
for i in {0..1}; do
for j in {1..5}; do
set_brightness 0 0
Expand Down Expand Up @@ -764,9 +766,9 @@ function kecak {
set_brightness 0 1 && sleep 0.1
set_brightness 0 0
set_brightness 1 1 && sleep 0.1
set_brightness 1 0
set_brightness 1 0
done

for i in {0..1}; do
set_brightness 0 1 && set_brightness 1 1 && sleep 1
set_brightness 0 0 && set_brightness 1 0 && sleep 1
Expand All @@ -776,7 +778,7 @@ function kecak {
set_brightness 0 1 && sleep 0.1
set_brightness 0 0
set_brightness 1 1 && sleep 0.1
set_brightness 1 0
set_brightness 1 0
done

for i in {0..1}; do
Expand Down Expand Up @@ -805,7 +807,7 @@ function sandstorm {
sleep 0.125
done
set_brightness 0 1 && set_brightness 1 0 # green on and red off
sleep 1.0
sleep 1.0
x=$(( x + 1 ))
done

Expand All @@ -822,7 +824,7 @@ function sandstorm {
sleep .15
x=$(( x + 1 ))
done

x=0
while [ $x -le 3 ]; do
for ((i=0;i<5;i++)); do
Expand All @@ -848,7 +850,7 @@ function sandstorm {
sleep .10
x=$(( x + 1 ))
done

x=0
while [ $x -le 1 ]; do
for ((i=0;i<6;i++)); do
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@treehouses/cli",
"version": "1.25.45",
"version": "1.25.46",
"remote": "4000",
"description": "Thin command-line interface for Raspberry Pi low level configuration.",
"main": "cli.sh",
Expand Down

0 comments on commit 19a13d4

Please sign in to comment.