@@ -30,6 +30,19 @@ function led {
3030 echo " Both LED: flash 2 times"
3131 newyear > " $LOGFILE "
3232 ;;
33+ blackhistorymonth)
34+ checkroot
35+ echo " leds are set to blackhistorymonth mode."
36+ echo " Look at your RPi leds, both leds will be in this pattern..."
37+ echo " Both LED's will flash in unison like a heartbeat"
38+ echo " Both LED: off 1 second"
39+ echo " Both LED: on .1 seconds"
40+ echo " Both LED: off .15 seconds"
41+ echo " Both LED: on .1 seconds"
42+ echo " Both LED: off .65 seconds"
43+ echo " this will happen 20 times"
44+ blackhistorymonth > " $LOGFILE "
45+ ;;
3346 lunarnewyear)
3447 checkroot
3548 echo " leds are set to lunarnewyear mode."
@@ -280,6 +293,32 @@ function newyear {
280293 led red " $current_red "
281294}
282295
296+ function blackhistorymonth {
297+ current_red=$( led " red" )
298+ current_green=$( led " green" )
299+
300+ set_brightness 0 0 && set_brightness 1 0
301+ sleep 1
302+
303+ for i in {1..20}
304+ do
305+ set_brightness 0 1 && set_brightness 1 1
306+ sleep .1
307+
308+ set_brightness 0 0 && set_brightness 1 0
309+ sleep .15
310+
311+ set_brightness 0 1 && set_brightness 1 1
312+ sleep .1
313+
314+ set_brightness 0 0 && set_brightness 1 0
315+ sleep .65
316+ done
317+
318+ led red " $current_red "
319+ led green " $current_green "
320+ }
321+
283322function lunarnewyear {
284323 current_green=$( led " green" )
285324 current_red=$( led " red" )
@@ -793,8 +832,9 @@ function random {
793832function led_help {
794833 echo
795834 echo " Usage: $BASENAME led [green|red] [mode]"
796- echo " $BASENAME led [newyear|lunarnewyear|valentine|carnival|lantern|stpatricks|easter|labourday|eid]"
797- echo " [dragonboat|independenceday|onam|diwali|thanksgiving|christmas|dance|heavymetal|random]"
835+ echo " $BASENAME led [newyear|blackhistorymonth|lunarnewyear|valentine|carnival|lantern|stpatricks]"
836+ echo " [easter|labourday|eid|dragonboat|independenceday|onam|diwali|thanksgiving]"
837+ echo " [christmas|dance|heavymetal|random]"
798838 echo
799839 echo " Sets or returns the led mode"
800840 echo
@@ -843,8 +883,11 @@ function led_help {
843883 echo " $BASENAME led newyear"
844884 echo " This will set the mode of the led to newyear"
845885 echo
886+ echo " $BASENAME led blackhistorymonth"
887+ echo " This will set the mode of the led to blackhistorymonth"
888+ echo
846889 echo " $BASENAME led lunarnewyear"
847- echo " This wil set the mode of the led to lunarnewyear"
890+ echo " This will set the mode of the led to lunarnewyear"
848891 echo
849892 echo " $BASENAME led valentine"
850893 echo " This will set the mode of the led to valentine"
0 commit comments