Updating the automation script clicker.sh
[pingpong.git] / automation / clicker.sh
index 50a88add479f911d1eac29d8e740038da7b821fe..cb00e6a08ae7ced3b7ff98c1e349b4acd5ae7de7 100755 (executable)
@@ -5,20 +5,35 @@
 
 # Loop variables
 BEGIN=1
-END=5
+END=100
 INC=1
 
 # Range of random number (in seconds)
-RAN_STA=2
-RAN_END=6
+RAN_STA=100
+RAN_END=200
 
 for ((i=$BEGIN; i<=$END; i+=$INC));
 do
+       #./adb shell getevent -l - use this command to get the position
        # TP-Link switch
        #./adb shell input tap 1002 913
-       date +%r
+       # TP-Link bulb on/off
+       ./adb shell input tap 981 358
+       # D-Link switch
+       #./adb shell input tap 987 346
+       # SmartThings
+       #./adb shell input tap 921 1188
+       # WeMo
+       #./adb shell input tap 981 532
+       # WeMo Insight
+       #./adb shell input tap 981 326
+       #date +%r
+       date +"%m/%d/%Y %r"
        #RAND=$[( $RANDOM % $RAN_END ) + $RAN_STA]
-       RAND=$[`jot -r 1 $RAN_STA $RAN_END`]
+       #RAND=$[`jot -r 1 $RAN_STA $RAN_END`]
        #echo "Delay: $RAND seconds"
-       sleep $[$RAND]s
+       #sleep $[$RAND]s
+       
+       # pick a prime number > 120 seconds
+       sleep 131s
 done