Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Basic Script for the Nexus Q that will have a "bouncing" rainbow on the light ring. Requires mcsaucy's work.
- # Starting Color Placements
- Count=1
- Rotation=0
- # Start the loop!
- while [ true ]
- do
- # Do we go forwards or backwords?
- if [ $Rotation -eq 1 ]
- then
- avrlights $Count 6 0xff 0x8888 0xff00 0x888800 0xff0000 0x0
- let "Count -=1"
- elif [ $Rotation -eq 0 ]
- then
- avrlights $Count 6 0x0 0xff 0x8888 0xff00 0x888800 0xff0000
- let "Count +=1"
- fi
- # Set rotation if it is time for next loop cycle
- if [ $Count -eq 27 ] ;
- then
- let "Rotation = 1"
- elif [ $Count -eq 1 ] ;
- then
- let "Rotation = 0"
- fi
- # Sleep time
- /system/xbin/sleep .0001
- done
Advertisement
Add Comment
Please, Sign In to add comment