CHIP Computer Project: CPU Monitor

Home/Arduino Projects/CHIP Computer Project: CPU Monitor

CHIP Computer Project: CPU Monitor

In this CHIP Computer Project we are going to connect an OLED display to the CHIP 9$ computer in order to monitor its CPU temperature in real time. Let’s start!

CHIP Computer Project: OLED CPU monitor

Today’s project is this: I have connected an I2C OLED display to the CHIP single board computer and I print the temperature of the CPU on it in real time! It is a very easy project to build and it can be easily ported to support the Raspberry Pi as well. Let’s see how to build this project.

I received the CHIP single board computer about a year ago. It is an impressive board, it costs $9 and it offers a 1GHz CPU, 512MB of RAM wifi Bluetooth and many more things. You can watch my review of the CHIP computer by clicking on the card here. As you can see the CHIP computer is a lot smaller than the Raspberry Pi 3 board and of course it costs a lot less. One year later, the software developed for the CHIP computer is mature and we can easily build some projects with it.

——————–
WHERE TO BUY
——————–

CHIP Computer: https://getchip.com/pages/chip

OLED display: http://bit.ly/OLED_DISPLAY

Xiaomi Powerbank: http://bit.ly/PowerBank_XiaoMi

Wires: http://bit.ly/Wires3InOne

 

Full disclosure: Some of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!

 

For this project we also use this small monochrome OLED display. It is one of my favorite displays because it is very easy to use since it use the I2C interface which only needs to connect two wires. The cost of this display is around $6. You can find links for both parts in the description of the video.

In order to connect the OLED display to the CHIP computer we only have to connect 4 wires. The GND pin of the display goes GND, Vcc goes to the 3.3V output of the display, SCL pin of the display goes to the SCK pin of the CHIP computer and lastly the SDA pin of the display goes to the SDA pin of the CHIP computer. It is very nice to have the pins labeled on the CHIP computer isn’t it? It makes things easier. Maybe the Raspberry Pi needs to follow the same tactic with their boards. Now, let’s move on the software side of the project.

——————–
LIBRARIES
——————–

CHIP_IO: https://github.com/xtacocorex/CHIP_IO

Adafruit_Python_GPIO: https://github.com/xtacocorex/Adafruit_Python_GPIO

rm-hull SSD1306: https://github.com/rm-hull/ssd1306

 

The software of this CHIP Computer Project

I have developed a simple Python program that reads the temperature of the CPU and prints it on the display. The value on the display is updated every 5 seconds. I have named the program temperatureOLED.py and I have placed the file on the desktop. In order to run it, at the console we write the following two commands:

cd Desktop in order to navigate to the desktop and

sudo python temperatureOLED.py

That’s it, the program will print the temperature in the console and it will display it on the display as well.

The code reads the temperature of the CPU using this command. We read the output of the command and we print the temperature on the display. As you can see, the code is very simple it is about 20 lines of code. As always you can find the code of the project in a link in the description of the video.

In order the program to be more useful, I added a cron job so the program to load automatically when the CHIP boots up. We run the following command:

sudo crontab –e

we enter the following line to the file:

@reboot python /home/chip/Desktop/temperatureOLED.py &

and we save the file.

Now if we boot up the CHIP we can see that the temperature is displayed on OLED screen automatically and it updates every 5 seconds.

——————–

CODE OF THE PROJECT
——————–

Download

 

 

 

——————–

SUBSCRIBE ON YOUTUBE

——————–

Never miss a video: Subscribe to educ8s.tv

2017-03-28T13:00:05+00:00

2 Comments

  1. Galen Wollenberg May 26, 2017 at 11:25 pm

    chip@chip:~$ sudo python temperatureOLED.py
    Traceback (most recent call last):
    File “temperatureOLED.py”, line 3, in
    from oled.device import ssd1306
    ImportError: No module named oled.device

    • Nick May 27, 2017 at 8:18 am

      Have you installed the OLED library correctly?

Comments are closed.

Close