This version extends the work of darkgrue and Gosherm, it provides the following features over the original Uctronics version:
- Displays hostname instead of IP address
- Top row is never deleted
- Correctly display CPU temperature units of measurement
- Added
/proc/stat
CPU calculation and enabled in favor oftop
(should be more accurate) - Added
df
disk free space calculation and enabled in favor ofstatfs()
(should be more portable) - Refactored the way numbers were being pushed to the display that should result in better formatting
- Fit decimals by width using significant figures
- Right-justify fields (against labels)
- Fixed
-Wall
compiler warnings - More robust error handling
- Added
/contrib
directory, support scripts- script to tar up files
- systemd service script
Begin by enabling the I2C interface:
sudo raspi-config
Choose Interface Options
| I2C
, then answer Yes
to whether you would like the ARM I2C interface to be enabled.
Install Git and library dependencies
sudo apt update
sudo apt install git -y
git clone https://github.com/davidjbradshaw/pi-rack-oled.git
cd pi-rack-oled/C
make clean && make
sudo ./display
Copy the binary file to /usr/local/bin/
:
sudo cp ./display /usr/local/bin/
Choose one of the following configuration options (systemd
or rc.local
):
sudo cp ../contrib/U6143_ssd1306.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable U6143_ssd1306.service
sudo systemctl start U6143_ssd1306.service
OR add the startup command to the rc.local
script (not recommended)
sudo nano /etc/rc.local
and add the command to the rc.local file:
/usr/local/bin/display &
Reboot your system:
sudo reboot now