How to enable Adafruit PiOLED on NANO

Showing IP address is a cool feature. The screen is enabled in the pre-installed Jetbot image. I’d like to add the PiOLED display on Nano board. Any suggestion on driver/package requirement? BTW, i2cdetect is able to see the device at i2c address 0x3c.

Just to clarify, NANO image doesn’t have PiOLED data enabled, but Jetbot image does.

Let me add a few more words. As a feature for Jetbot, I understand that issues regarding PiOLED are typically discussed on Jetbot’s GitHub. The idea is that the ability to show IP address seems handy for Nano operation as well if you intend to use tools like JupyterLab in a web based environment on Nano. So, I’m trying to light up PiOLED on Nano.

I plug in the PiOLED just like Jetbot on GPIO pin 1,2,3,6. And use i2cdetect to verify the PiOLED communicate at the correct address.

sudo i2cdetect -y -r 1
[sudo] password for jetson:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- – -- – --
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- 3c – -- –
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- – -- – -- – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

Could anyone help for the next step in order to show the IP address on PiOLED like Jetbot?

hello tmx3,

assume you’re finish environment setups through JetBot wiki page.
I did not have experience to control PiOLED. suggest you might enable i2c communication, to talk with PiOLED.
please refer to kernel APIs to read/write the values to registers.
for example,

<i>$l4t-r32.2/public_sources/kernel_src/kernel/kernel-4.9/include/linux/regmap.h</i>

static inline int regmap_read(struct regmap *map, unsigned int reg, unsigned int *val){...}
static inline int regmap_write(struct regmap *map, unsigned int reg, unsigned int val){...}

Hi @tmx3. You may find the following JetsonHacks article useful:
https://wp.me/p7ZgI9-33H

Thanks JerryChang and Kangalow for your helps.

Oh, my! The solutions by JetsonHacks are consistently the best for my Jetson project. Once again, thank you!

I tested the process and worked in one shot. BTW, the default IP address is shown for ETH0 which is for Ethernet wired connection. In case you need to display the wireless IP address, edit the stats.py (see the link by Kangalow for accessing the file) and replace all “eth0” with “wlan0” in the code.