I have two very frustrating problems
First -- I have a mono Adafruit ssd1306 display which I believe is defaulted to I2c 0x03.
I have installed the circuitpy.uf2 file and the three support files in a LIB folder and tried some simpletest.py programs but I caanot get the display to display anything at all. I also get error messages for the I2c address
Second -- I have tried a i2c scan program below and I get the following error message:
ImportError: no module named 'machine'
-------------------------------------------------------------------------------------------------------------------------------
Code: Select all
import machine
sda=machine.Pin(0)
scl=machine.Pin(1)
i2c=machine.I2C(0,sda=sda, scl=scl, freq=400000)
print('Scan i2c bus...')
devices = i2c.scan()
if len(devices) == 0:
print("No i2c device !")
else:
print('i2c devices found:',len(devices))
for device in devices:
print("Decimal address: ",device," | Hexa address: ",hex(device))
I am getting frustrated and need some further guidance
Thanks in advance
Tom