22nd Oct, 2013, 03:17 AM
Displaying the RPi temperature
As part of my testing procedure, I wanted to know the temperature of the RPi through various phases. There was nothing out there that served my purpose, so I wrote my own script, that would do that.
It's written in python and utilises curses to do the display. It's not the most elaborate and probably full of errors that qualified python developers know about. However it works, and does not consume vast amounts of CPU.
It polls the temperature every 60s and displays the current temperature, high and low, changing colour as the temperature increases so red is bad and purple is very bad. (you can change it you wish)
[attachment=240]
I give it to you as free, I do not guarantee it will work, it should not trash your RPi, it should not have sex with your daughter nor should it communicate with aliens - you have been warned. Use at your own risk as all the SW companies now say - I cannot be responsible for your daughters purity
Grab it from RPi Temp save to /home/xbian/bin. Call it what you like but add .py at the end. Make it executable chmod +x filename.py
Before it will work you need to install python-psutils so sudo apt-get install -y python-psutil
If you like it and improve it, please post your improvements so we can all benefit. Tnx
If you get the error: No such file or directory: Some <cntl> M have got into it - vi it and remove all <cntl> M and it will work
It's only there for 30 days so get if you want it.
As part of my testing procedure, I wanted to know the temperature of the RPi through various phases. There was nothing out there that served my purpose, so I wrote my own script, that would do that.
It's written in python and utilises curses to do the display. It's not the most elaborate and probably full of errors that qualified python developers know about. However it works, and does not consume vast amounts of CPU.
It polls the temperature every 60s and displays the current temperature, high and low, changing colour as the temperature increases so red is bad and purple is very bad. (you can change it you wish)
[attachment=240]
I give it to you as free, I do not guarantee it will work, it should not trash your RPi, it should not have sex with your daughter nor should it communicate with aliens - you have been warned. Use at your own risk as all the SW companies now say - I cannot be responsible for your daughters purity
Grab it from RPi Temp save to /home/xbian/bin. Call it what you like but add .py at the end. Make it executable chmod +x filename.py
Before it will work you need to install python-psutils so sudo apt-get install -y python-psutil
If you like it and improve it, please post your improvements so we can all benefit. Tnx
If you get the error: No such file or directory: Some <cntl> M have got into it - vi it and remove all <cntl> M and it will work
It's only there for 30 days so get if you want it.