Tuesday, 22 January 2013

Raspberry Pi

1st thing to do to play with GPIO
http://www.raspberrypi-spy.co.uk/2012/05/install-rpi-gpio-python-library/
http://pypi.python.org/pypi/RPi.GPIO

#1 : if there is error when install RPi.GPIO, need to install python dev at sudo apt-get install python-dev

Sunday, 20 January 2013

ping

sos : http://www.cyberciti.biz/faq/crontab-every-10-min/

0 * * * * /bin/ping -c 10 8.8.8.8 || reboot

every hour will ping to check connection

* * * * * /bin/ping -c 10 8.8.8.8 || reboot

every minutes will ping to check connection 



* * * * * /bin/ping -q -s 1 -c 60 8.8.8.8 & > /dev/null