Showing posts with label temperature. Show all posts
Showing posts with label temperature. Show all posts

Friday, February 23, 2024

Monday, September 21, 2020

Odroid XU4 Energy Monitor

 

https://github.com/hardkernel/EnergyMonitor 

Need to install qt4 qwt dev and git

Install packages and clone the source code.

# sudo apt-get install qt4-default libqwt-dev
# git clone https://github.com/hardkernel/EnergyMonitor.git

Make!

# qmake-qt4
# make -j8

 

--30--

Saturday, May 16, 2020

Raspberry Pi sense hat board


Board contains an 8x8 array of tri color leds.

Also the following sensors and utility:

ST Micro inav unit
   contains orientation and compas sensor

ST micro pressure / temp / humidity sensor

Joystick

When installed on a raspberry pi 4, has to have a config setting changed to force on an HDMI port.  Don't know if it's because there are two of these on the board, or if it's because of a gpio / programming conflict, but when run headless, the board won't boot w/o that change.

http://jim-st.blogspot.com/search/label/raspbian%20wifi%20headless

Solution was to edit the /boot/config.txt.
Remove the "#" in front of the line "hdmi_force_hotplug=1" and now the Raspberry Pi is booting attached with the SenseHAT.


https://www.raspberrypi.org/forums/viewtopic.php?t=243949

https://github.com/astro-pi/python-sense-hat/issues/96

Github repository for board
https://github.com/astro-pi/python-sense-hat

Sense-of-life, small John Conway life for sense hat
https://github.com/imrehg/senseoflife

Python lib documentation
https://pythonhosted.org/sense-hat/

Example page
https://www.deviceplus.com/raspberry-pi/the-sense-hat-add-on-board-for-raspberry-pi-6-types-of-sensors/


--30--

Wednesday, June 5, 2019



Article

https://medium.com/@kevalpatel2106/monitor-the-core-temperature-of-your-raspberry-pi-3ddfdf82989f


#!/usr/bin/python2.7
import os
import time

def measure_temp():
        temp = os.popen("vcgencmd measure_temp").readline()
        return (temp.replace("temp=",""))

while True:
        print(measure_temp())
        time.sleep(1)


Thru a web page using python direct listening

https://raspberrypi.stackexchange.com/questions/8689/how-do-i-display-the-temperature-from-the-internal-sensor-on-a-html-page

install python-tornado

#!/usr/bin/env python

import tornado.ioloop
import tornado.web
import os

class MainHandler(tornado.web.RequestHandler):
    def getCPUtemperature( self ):
        res = os.popen('vcgencmd measure_temp').readline()
        return(res.replace("temp=","").replace("'C\n",""))

    def get(self):
        self.write( "Temperature: %s" % ( self.getCPUtemperature() ) )

application = tornado.web.Application([
    (r"/", MainHandler),
])

if __name__ == "__main__":
    application.listen(8888)
    tornado.ioloop.IOLoop.instance().start()
 

using RRD tool

http://lazydroid.com/2013/05/raspberry-pi-monitoring-cpu-temperature-with-rrdtool/

raw measurement of cpu temp
 
vcgencmd measure_temp
Monitor loop
watch -n 1 vcgencmd measure_temp


 

--30--