Has anyone added an RTC

Yes, I’ve tried i2c0, i2c1, and i2c2! Not working!

[  286.020470] i2c i2c-1: new_device: Instantiated device ssd1306 at 0x3c
[  298.655530] i2c /dev entries driver
[  325.979927] i2c i2c-0: new_device: Instantiated device ssd1306 at 0x3c
[  447.496438] i2c i2c-2: new_device: Instantiated device ssd1306 at 0x3c

Output of i2cdetect :

root@bpi-r2:/home/Adafruit_Python_SSD1306/examples$ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
root@bpi-r2:/home/Adafruit_Python_SSD1306/examples$ i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- 37 -- -- 3a -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- 4a 4b -- -- -- -- 
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
root@bpi-r2:/home/Adafruit_Python_SSD1306/examples$ i2cdetect -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --

But Adafruit_Python_SSD1306 stats script can only write to screen if it’s attached to pin 3 and pin 5.

I have not done much with i2c…only rtc on i2c0 long time ago…your bootlog shows that device is found on 0x3c for each i2cX…strange that it is not shown in i2cdetect…maybe anyone else has an idea

Sorry Frank for disturbing you!

I’ve found the problem, it was in the Adafruit library! After added device :

echo ssd1306 0x3C > /sys/class/i2c-adapter/i2c-2/new_device

I had to explicit say where to search for oled screen :

i2c_bus=2

It works like a charm!

1 Like

Can you write a full todo (separate thread),if anybody (inclusive me) wants to try it out?

I think can be usedul to show a kind of status (online status,interfaces,ips,…). How to write text to it?

I opened a separate thread, please have a look!

Für weitere Fragen stehe ich gerne zur Verfügung! :slight_smile: