This is pretty Adafruit CircuitPython specific, hence the one and only CircuitPython tag
I'm playing around with a Metro Express M0 board and trying to get it to display on a Jansane 16x2 1602 LCD with CircuitPython. I'm trying to adapt these instructions. I know that the Metro is seeing the device, as for
import board
import busio
i2c = busio.I2C(board.SCL, board.SDA)
while not i2c.try_lock():
pass
while True:
print("I2C addresses found:", [hex(device_address)
for device_address in i2c.scan()])
time.sleep(2)
I get:
I2C addresses found: ['0x27']
which agrees with the default address for the LCD.
However, if I try:
import adafruit_character_lcd.character_lcd_i2c as character_lcd
i2c = busio.I2C(board.SCL, board.SDA)
lcd = character_lcd.Character_LCD_I2C(i2c, 16, 2)
I get:
...
File "adafruit_bus_device/i2c_device.py", line 171, in __probe_for_device
ValueError: No I2C device at address: 20
Is the I2C address hard coded into the library files in CircuitPython? Is there any way to set if for address 20?
Thanks in advance!