Skip to content

Instantly share code, notes, and snippets.

@seksitha
Last active August 16, 2019 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seksitha/7929b161bbd89d017384a83f003a8709 to your computer and use it in GitHub Desktop.
Save seksitha/7929b161bbd89d017384a83f003a8709 to your computer and use it in GitHub Desktop.
#Crontab -e
57 07 * * 1-5 python /home/pi/Documents/py_ball.py
55 08 * * 1-5 python /home/pi/Documents/py_ball.py
02 09 * * 1-5 python /home/pi/Documents/py_ball.py
00 10 * * 1-5 python /home/pi/Documents/py_ball.py
02 10 * * 1-5 python /home/pi/Documents/py_ball.py
00 11 * * 1-5 python /home/pi/Documents/py_ball.py
45 11 * * 1-5 python /home/pi/Documents/py_ball.py
35 12 * * 1-5 python /home/pi/Documents/py_ball.py
40 12 * * 1-5 python /home/pi/Documents/py_ball.py
30 13 * * 1-5 python /home/pi/Documents/py_ball.py
57 13 * * 4-5 python /home/pi/Documents/py_ball.py
55 14 * * 4-5 python /home/pi/Documents/py_ball.py
57 14 * * 4-5 python /home/pi/Documents/py_ball.py
55 15 * * 4-5 python /home/pi/Documents/py_ball.py
00 16 * * 4-5 python /home/pi/Documents/py_ball.py
00 17 * * 1-5 python /home/pi/Documents/py_ball.py
55 17 * * 1-5 python /home/pi/Documents/py_ball.py
05 18 * * 1-5 python /home/pi/Documents/py_ball.py
19 07 * * 1-5 python /home/pi/Documents/py_ball.py
# crontab @reboot deos not work to rund this command so
sudo nano /etc/profile # this make available to all users. instead of $HOME/.profile
# add following line the last
setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,kh
#for ubuntu high security of vnc just do this command
gsettings set org.gnome.Vino require-encryption false
#Pinet bash access
sudo ltsp-chroot --arch armhf
# after make change need to compress image
ltsp-update-image /opt/ltsp/armhf
# Pinet is multi user environment so make sure the change is available to all user when do. /etc or /etc/skel is for that.
from time import sleep
import RPi.GPIO as io
io.setwarnings(False)
io.setmode (io.BOARD)
io.setup(13,io.OUT)
myint = 0;
while (myint == 0):
myint = 1
# ring 1
io.output(13,1)
sleep(0.5)
io.output(13,0)
sleep(0.5)
# ring 2
io.output(13,1)
sleep(0.5)
io.output(13,0)
sleep(0.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment