Difference between revisions of "Software:Solar Power"

From HiveTool
Jump to: navigation, search
Line 29: Line 29:
Syncs the clock.  Call by cron and rc.local.
Syncs the clock.  Called by cron and rc.local.

Revision as of 10:14, 28 January 2014

These scripts should save significant power by shutting down the Ethernet and USB ports.


Turns on the Ethernet and USB ports. Sets up networking.

echo 0x1 > /sys/devices/platform/bcm2708_usb/buspower                                                                                                                               
sleep 3                                                                                                                                                                             
/sbin/ifconfig wlan0 down                                                                                                                                                           
echo "search domain_not_set.invalid                                                                                                                                                 
nameserver" > /etc/resolv.conf                                                                                                                                        
/sbin/ifconfig wlan0 up                                                                                                                                                
/sbin/iwconfig wlan0 mode Managed                                                                                                                                                   
/sbin/iwconfig wlan0 essid dlink                                                                                                                                                    
/sbin/route add default gw wlan0                                                                                                                                        


/sbin/ifconfig wlan0 down                                                                                                                                                           
echo 0x0 > /sys/devices/platform/bcm2708_usb/buspower                                                                                                                               


Syncs the clock. Called by cron and rc.local.

timeout 20 /usr/sbin/ntpd -qg                                                                                                                                                       


  • Turn off HDMI (saves about 20 ma.)
  • Set the clock on boot up. (Note ntpd must be disabled.)
/opt/vc/bin/tvservice -off
timeout 60 /home/hivetool/sync_clock.sh                                                                                                                                             


Syncs the clock four times a day. (1:07, 7:07, 13:07, and 19:07)

# Synch the clock                                                                                                                                                                   
7 1,7,13,19 * * * /home/hivetool/sync_clock.sh