Files

start
#!/bin/bash UPDATELCD=/home/pi/chairbot/updatelcd sudo sixad --stop & if hcitool dev|grep hci0; then $UPDATELCD "Bluetooth OK" else $UPDATELCD "No Bluetooth device" exit fi $UPDATELCD "Start sixad" sudo sixad --start & $UPDATELCD "Press PS button" while true; do if dmesg |grep "Sony Computer"; then $UPDATELCD "Connected" break fi sleep 0.1 done if [ -e /home/pi/chairbot/noautostart ]; then $UPDATELCD "NO AUTOSTART" else $UPDATELCD "Wait 10" sleep 1 $UPDATELCD "Wait 9" sleep 1 $UPDATELCD "Wait 8" sleep 1 $UPDATELCD "Wait 7" sleep 1 $UPDATELCD "Wait 6" sleep 1 $UPDATELCD "Wait 5" sleep 1 $UPDATELCD "Wait 4" sleep 1 $UPDATELCD "Wait 3" sleep 1 $UPDATELCD "Wait 2" sleep 1 $UPDATELCD "Wait 1" sleep 1 $UPDATELCD "Start controller" /usr/bin/python /home/pi/chairbot/controller/controller.py $UPDATELCD "Failed!" fi
Report a bug