Git Product home page Git Product logo

arduino-pc-monitor's Introduction

Arduino PC Monitor

An Arduino program and Python script that work together to give you realtime information about your system on an LCD!

screenshot

How does it work?

The Python script uses Open Hardware Monitor's built-in web server to get the following information and send it to the Arduino via serial:

  • CPU load and core temperatures (up to 4 cores)
  • GPU load, core temperature and used memory
  • GPU fan speed percentage and RPM (with cool little fan animation!)
  • GPU core and memory clock

Then the Arduino displays this information on its LCD display. Since it's powered by USB, the display turns on or off with your PC.

Hardware setup

You only have to connect a 20x4 character LCD to your Arduino and then connect it to your computer via USB. Note that since I didn't have a potentiometer, I connected my LCD's backlight (Bklt+) and contrast (Vo) pins to the Arduino's PWM outputs 9 and 6 respectively.

The LCD has to be compatible with the LiquidCrystal library. If you have a smaller one like 16x2 you can edit the program to make it display less information.

I used an Arduino clone called "Pro Micro" because of its small size. It has an ATmega32u4 microcontroller like the Arduino Leonardo but the code should also work with Arduino UNO and similar.

Software setup

Keep in mind this only works on Windows.

  1. Install Open Hardware Monitor v0.8.0 Beta

  2. Install Python 3+ (tested with 3.4-3.7), making sure to check the "Add Python 3.X to PATH" checkbox so you can run it from the Command Prompt. screenshot

  3. Install the pyserial package by running pip install pyserial in a Command Prompt: screenshot

  4. In the config.json file, change the options to suit your system. Find the serial port your Arduino connects to (via Device Manager), set the CPU and GPU names to the ones appropriate to your system (as they are shown in Open Hardware Monitor) and set the correct GPU memory size for your GPU. You can also change the IP and port of Open Hardware Monitor's web server (default is localhost:8085)

  5. In the Arduino code, setup the LCD settings and pins depending on your configuration, then run it!

  6. Make everything run on startup

Done :)

Making everything run on startup

Set these options in Open Hardware Monitor:

screenshot

Also check "Run" in the "Remote Web Server" submenu.

Setup a task in Windows' Task Scheduler (find it by searching in the start menu) to start the Python script silently:

  • Set the task to "Start a program"

  • Set the program to pythonw.exe (so it doesn't create a command prompt window). The default path to this file is %LocalAppData%\Programs\Python\Python37\pythonw.exe (also depends on your Python version).

  • Add the path to ArduinoPCMonitor.py as an argument (enclose in quotes if it has any spaces). The task action should look similar to this: screenshot

  • Set the task to run at log on of any user and on workstation unlock

  • Finally, in the Settings tab of the task, select to Stop the existing instance if the task is already running

Thanks

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.