2

I'm completely lost on how to even get this to work.

I have a usb ft232h breakout board that is suppose to support i2c as well as gpio. I can get basic gpio devices to work just fine however I'm having a ton of issues regarding the I2C LCD that's suppose to fit as well.

When I do i2cdetect -y 1 (I'm on a Raspberry Pi 3 Model B Plus Rev 1.3) I just see the following.

$ 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: -- -- -- -- -- -- -- --

However when I run the following script from python

import board
import time
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 see:

 $ python i2ctest.py
I2C addresses found: ['0x20']

So I know the LCD is visible to python through busio. This is where I'm stuck. I have no idea how to write to this LCD.

This LCD is the DFRobot dfr0063, and it uses a PCF8574 i2c expander chip. This is an issue because the adafruit_character_lcd library with circuit python only supports MCP230xx chips. So, my current script won't work.

import board
import busio
import time
import adafruit_character_lcd.character_lcd_i2c as character_lcd

i2c = busio.I2C(board.SCL, board.SDA)
print(i2c)

lcd = character_lcd.Character_LCD_I2C(i2c, 16, 2)

while True:
    print("hello worlding")
    lcd.message = 'Hello\n World!'
    time.sleep(5.0)
    print("sorta working")
    lcd.message = 'I can sorta work!'
    time.sleep(5.0)

Has anyone been able to get rplcd to work through an ft232h chip? I haven't been able to figure out how. Also I tried looking into using this fork of the character_LCD https://github.com/dhalbert/CircuitPython_LCD library, but that hasn't worked either. I just get an "Microcontroller error, ft232h not supported" message.

nullmage
  • 145
  • 1
  • 3
  • 8

0 Answers0