Skip to content

Modification of installPiOLED system stats script to work with a 128x64 SH1106 OLED screen on a Jetson Nano

License

Notifications You must be signed in to change notification settings

EtoTen/installPiOLED_sh1106

 
 

Repository files navigation

installPiOLED

Quick and dirty hack to:

  1. Make this stats script work with a 128x64 oled screen with a sh1106 driver using the luma.oled library (instead of 128x32 oled screen with a ssd1306 driver using Adafruit-SSD1306)
  2. Add a "starfield" screen saver to display alternatively to the stats every 60 seconds (to prevent burn in)

Notes:

-Starfield code is from: https://github.com/rm-hull/luma.examples/blob/master/examples/starfield.py

-Original stat codes is from: https://github.com/JetsonHacksNano/installPiOLED

#####ORIGINAL README.md BEGIN#####

Install the Adafruit PiOLED 128x32 Monochrome OLED driver (3527)

Original article on JetsonHacks: https://wp.me/p7ZgI9-33H

The Adafruit PiOLED is a handy little display that connects to the Jetson Nano GPIO header. The display communicates with the Jetson over I2C, and is powered via the GPIO pins.

There are two scripts here, along with an file which displays information on the display. The file is pioled/stats.py. Gernerally you will modify the stats.py file to meet your needs. The default is to show the eth0 address, an updating GPU usage bar graph, memory usage and disk usage.

The first script, installPiOLED.sh will install the Adafruit-SSD1306 library. The SSD1306 is the driver chip for the PiOLED. Note that we use pip3 to install this library. Usage:

$ ./installPiOLED.sh

Once the library is installs, you can then run the example:

$ cd pioled
$ python3 stats.py

If you would like to run the display stats app on system startup, the createService.sh script will install the stats app as a global library in /usr/local/lib/ as pioled, and create a startup service to launch. The startup service is in /etc/systemd/system/pioled_stats.service

To create the service:

$ ./createService.sh

You should consider filling out the setup.py file in the top directory more fully for your application.

Notes

December, 2019

Initial Release
  • Jetson Nano
  • L4T 32.2.1/JetPack 4.2.2

About

Modification of installPiOLED system stats script to work with a 128x64 SH1106 OLED screen on a Jetson Nano

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 86.3%
  • Shell 13.7%