Coder Social home page Coder Social logo

check-your-temps's Introduction

Check your temps

This project displays your CPU + GPU temperature using a Raspberry Pi Pico with an OLED screen. It was built for a one-off Christmas gift, don't expect too much in the way of stability or execution.

A nice photo of the device in action

Display

I used a Raspberry Pi Pico with Pre-soldered Headers (£6) and this 1.3" 64x128 OLED Screen (£8.50). I also used a down-angled micro-USB cable (£5) for aesthetics but really any micro-USB cable would be fine.

You'll probably want Thonny to set up the pico for MicroPython, and copying the files in pico/ on to the pico.

Windows App

There's two parts to this. You need to get the app, then configure it to run on when you logon.

Get the app

Easiest option is to use the latest release on GitHub.

Building from source

If you want to rebuild from scratch you need to have virtualenv. Then install the dependencies using:

python -m virtualenv .venv
.venv/Scripts/activate.bat
pip install -r requirements.txt

Then run:

pyinstaller --clean --add-data "OpenHardwareMonitorLib.dll;." check_your_temps.py

You should find the package constructed under the dist/ subdirectory. You'll also have a build/ subdirectory.

Some issues you might run into

To use OpenHardwareMonitorLib.dll, you might find you need to unblock it first.

When you build the installer, it might trigger alerts from antivirus software. That seems to be a common issue with pyinstaller. I've implemented the easy suggestions in that thread.

If you have been running the app and want to make changes, you might need to disable any scheduled tasks and reboot first. If you don't, you can end up with a file in the dist/ subdir that you can't delete.

Run the app when you log on

To do this, set up the app to run as high-permission background task on your system. For some reason accessing the CPU temperature needs administrator permissions.

Launch a Command Prompt as Administrator. Then run (updating the path to the location on your system):

schtasks /create /sc ONLOGON /tn checkmytemps /tr C:\FULL\PATH\TO\check_your_temps.exe /ru SYSTEM

That will make a scheduled task to run on log on called 'checkmytemps'. The task will run check_your_temps.exe with System-level (ie very high) permissions. You can view the task by searching for 'Task Scheduler' in the start menu. You can also manually start it from this interface. (Right-click --> Run)

The task can be a bit fragile. You can make it a bit more resilient by opening the task from Task Scheduler, going to settings, and making it retry when failed up to some number of times. I set 3. There's probably a way to do this from the CLI as well.

If you want to view the process itself, you'll see it under background tasks in task manager. On my system it uses about 25MB of RAM, and about 0.1% of a CPU core.

check-your-temps's People

Contributors

giqles avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.