Add a OLED display to your OrangePi with the system info!
First you need to have the WiringPi installed and enable the I2C module.
If you use armbian, just run sudo armbian-config and go to System > Hardware select i2c0 and then Save;
After that, clone the repository:
git clone https://github.com/andrejrcarvalho/OrangePi_SSD1306.gitThen build the executable file with:
cd ./OrangePi_SSD1306
make clean all
chmod +x ./display.outNow you need to connect the screen to your OrangePi following the next table:
| SSD1306 | OrangePi |
|---|---|
| VCC | 3.3v |
| GND | 0v |
| SDA | SDA.0 |
| SDK | SCL.0 |
The program needs also a button to wake up the screen, this button should be connected between the GPIO.1 pin and the 0v pin;
To help with the wiring use the command gpio readall to get the pin layout of your OrangePi.
NOTE: the extra wire from the button is to light up a LED inside the button
After this run the program:
sudo ./display.outYou can add a cron job to run the program each time the system boots up with the command sudo crontab -e and add the following line at the end:
@reboot /<path to the folder>/display.out
