So thanks to a few people on here ( especially hanahKobain ) for pointing me in helpful directions… I built an image including “pinpong” and was able to actually create a python app, that runs upon boot and displays IP addresses (and time) on an SSD1306 display.
BUT… there seems to be a problem with using i2c.scan() under pinpong.
Not sure why, but it does NOT show all available i2c devices on bus1.
Yet if I do, “i2cdetect -r 1 -y” from terminal, it shows all available i2c devices.
i2c.scan seems to have a limited range of devices it looks for.
Anyone know HOW to make i2c.scan() look at ALL i2c addresses?
Also, when I change the bus from 1 to 2 (there is a valid i2cdev-2 on my boards as I can see devices on it when I do i2cdetect -r 2 -y.), it gives me an error saying I can only use 0,1,2 busses???
Here is the output from an example app supplied with pinpong (with a little modification where I attempted to detect devices by looping thru addresses and attempting i2c.read_byte(device)…
[root@milkv-duo]~# python i2c_scan2.py
milkv-duo
| ____ _ ____ |
| / __ ()__ / __ ____ ____ ____ _ |
| / // / / __ / // / __ / __ / __ `/ |
| / / / / / / / // / / / / // / |
|// /// /// _// //_, / |
| v0.5.2 Designed by DFRobot // |
|_______________________________________|
<pinpong.board.Board object at 0x3fc2a40fd0>
I2C Devices:
00: – – – – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – – – – – – – – –
Done
[ 9461.515397] i2c i2c-1: adapter quirk: no zero length (addr 0x003d, size 0, write)
[ 9461.524653] i2c i2c-1: adapter quirk: no zero length (addr 0x003e, size 0, write)
[ 9461.533619] i2c i2c-1: adapter quirk: no zero length (addr 0x003f, size 0, write)
[ 9461.542900] i2c i2c-1: adapter quirk: no zero length (addr 0x0040, size 0, write)
[ 9461.551585] i2c i2c-1: adapter quirk: no zero length (addr 0x0041, size 0, write)
[ 9461.561077] i2c i2c-1: adapter quirk: no zero length (addr 0x0042, size 0, write)
[ 9461.569747] i2c i2c-1: adapter quirk: no zero length (addr 0x0043, size 0, write)
[ 9461.578991] i2c i2c-1: adapter quirk: no zero length (addr 0x0044, size 0, write)
[ 9461.587663] i2c i2c-1: adapter quirk: no zero length (addr 0x0045, size 0, write)
[ 9461.597157] i2c i2c-1: adapter quirk: no zero length (addr 0x0046, size 0, write)
i2c list:
0x3C
==========================
here is the output from “i2cdetect -r 1 -y”,
==========================
[root@milkv-duo]~# i2cdetect -r 1 -y
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – – – – – – – – – – 3c – – –
40: – – – – – – – – 48 – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – 68 – – – – – – –
70: – – – – – – – –
==========================