flymin / installPiOLED

Install the Adafruit PiOLED 128x32 Monochrome OLED driver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

installPiOLED

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

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

Tutorial for setting up adafruit hardware on jetson: https://learn.adafruit.com/circuitpython-libraries-on-linux-and-the-nvidia-jetson-nano/initial-setup

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

Install the Adafruit PiOLED 128x32 Monochrome OLED driver

License:Other


Languages

Language:Python 83.7%Language:Shell 16.3%