Blog 06

From BitWizard WIKI
Revision as of 15:59, 11 September 2015 by Cartridge1987 (talk | contribs)

Jump to: navigation, search


Now we will also add the time under the temperature: Here for we combine the codes together. We have the previous timer code where we remove the other information on the top we put the temperature: 11:00b ( 00 for the first row 11 for display ) which is connected with the code of; showtimer. and on the second row the timer. ( 11:20b )

I made a new folder called: Koekje + with all the files referencing: Koekje.

# What display to use: 
Koekje="bw_tool -I -D /dev/i2c-1 -a 94" 
# e.g. for SPI use: 
#DISPL="bw_tool -D /dev/spidev1.0 -a 94" 
#clean the display 
$Koekje -W 10:0:b 
while true; do 
        #get cpu loads 
        load=`cut -d' ' -f-3 /proc/loadavg` 
        #show temperature 
        $Koekje -W 11:00:b 
        $Koekje -t "temp: "`./showtemp` 
        #print the current time 
        $Koekje -W 11:20:b 
        $Koekje -t `date +%H:%M:%S` 
        #idle for 5 seconds 
        sleep 5 


This picture was taken on the same moment it changed from time

On Blog 07 I am going to use the buttons to print text on the display.