A real-time system monitoring solution that displays system metrics, battery status, and system information on an LCD screen through serial communication. The project consists of an Arduino-based client that controls the LCD display and a Rust-based server that collects system information.
- Arduino board (or compatible microcontroller)
- I2C LCD Display (16x2 characters)
- USB connection to your PC
- Arduino client program (./client)
- Rust server application (./server)
- CPU
- Usage
- Percentage
- RAM usage
- Swap usage
- GPU (Nvidia only) *
- Usage
- Temperature
- Memory usage
- Battery information *
- Charging status
- Battery percentage
- Network upload and download rate
- Now playing music information *
- Playing/paused
- Author
- Song title
(*) Information will only be shown if available
Wire
(built-in)LiquidCrystal_I2C
(1.1.2)
- Install
arduino-cli
- Navigate to client
- Install the required libraries with
arduino-cli
(user-wide):make install-libs
- Connect the I2C LCD display to your Arduino. The code is intended to be ran with a 16x2 display.
- Compile client/client.ino and upload it to your board:
The arguments are directly passed to
make port=<port> board=<board>
arduino-cli
, hence theboard
parameter syntax is the same you'd expect when usingarduino-cli
. Example use:make port=/dev/ttyUSB0 board=arduino:avr:nano
.
- Install
cargo
- Navigate to server
- Build the program:
cargo build --release
Execute the program:
cargo run --release
The program will try to detect automatically the client device. It will connect to the first device found that has the Arduino vendor ID (0x0403). If none are found, it will connect to the first USB device found. If you want to bind the program to a certain device append it to the end of the command. Nevertheless, I don't recommend doing it on Linux as the Arduino might be recognised as another device when it is connected a second time.
Execute server/autostart-systemd.sh
to make the program start automatically on login
Uninstall the libraries if you don't need them (user-wide):
make uninstall-libs
You only need to do this if you followed this step before.
systemctl disable --now lcd-system-monitor.service