TIPS
Read temperature sensor (value/1000 = temperature ºC):
$ cat /sys/class/thermal/thermal_zone0/temp
47078
Disable LAN9512 (this chip consume arounfd 200mA):
$ echo 0x00 > /sys/devices/platform/bcm2708_usb/buspower
Enable LAN9512 (this chip consume arounfd 200mA):
$ echo 0x01 > /sys/devices/platform/bcm2708_usb/buspower
HOW TO CHECK THE WATCHDOG
First of all, you will have to have this script in he /etc/init.d folder:
Quote Edit Delete
He añadido un script en /etc/init.d/S15watchdog para activar y configurar el watchdog:
#!/bin/sh
#
# Start watchdog
#
case "$1" in
start)
echo "Starting watchdog..."
watchdog -t 5 /dev/watchdog
;;
stop)
;;
restart|reload)
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
Para probar que el watchdog funciona correctamente, provoco un kernel panic con la siguiente línea:
And in order to force a block you will have to execute:
# sync; sleep 2; sync; echo c > /proc/sysrq-trigger
USEFUL COMMANDS FOR RASBPIAN OS
rasp-config: is a tool to config the raspberry pi. You can learn more about this command in this link link.
apt-get install name_application: install an application.
apt-get remove name_application: remove an application.
apt-get update: update list of repositories.
apt-get upgrade: update the system.
rpi-update: is a tool to upgrade the firmware. An easier way to update the firmware of your Raspberry Pi.
For read temperature: cat /sys/class/thermal/thermal_zone0/temp
#!/bin/sh
# /**
# @file read_temperature.sh
# @author Oscar Gomez Fuente <oscargomezf@gmail.com>
# @ingroup iElectronic
# @date 02/05/2014
# @version 1.0.0
# @section DESCRIPTION
# script to read RPi's temperature
# */
value=$(echo "scale=2; $(cat /sys/class/thermal/thermal_zone0/temp)/1000" | bc)ºC
echo "RPi temperature: $value"
USEFUL PROGRAMS
scrot: is a minimalistic command line screen capturing application link.
USING HDMI-LCD 800x480 WITH TOUCH SCREEN
Open /boot/config.txt and add these lines:
Hdmi_force_hotplug = 1
Hdmi_group = 2
Hdmi_mode = 1
Hdmi_mode = 87
Hdmi_cvt 800 480 60 6 0 0 0
Start_file = start_x.elf
Fixup_file = fixup_x.elf
LINKS