Serial LCD
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- hotcarrier
- Posts: 31
- Joined: Wed Oct 23, 2013 4:44 pm
Serial LCD
I have some serial interfaced LCDs to which I would like to send data via the Feather TX pin separately from the REPL serial interface. Is there a circuitpython serial/uart library available?
- danhalbert
- Posts: 4655
- Joined: Tue Aug 08, 2017 12:37 pm
Re: Serial LCD
Yes! Just use `busio.UART`: http://circuitpython.readthedocs.io/en/ ... /UART.html
- hotcarrier
- Posts: 31
- Joined: Wed Oct 23, 2013 4:44 pm
Re: Serial LCD
@danhalbert busio.UART works just fine for ascii, but I cannot figure out how to pass a control sequence (254,1) through it. Any suggestions?
- danhalbert
- Posts: 4655
- Joined: Tue Aug 08, 2017 12:37 pm
Re: Serial LCD
You can just send a sequence of bytes that is the control sequence, e.g.
Code: Select all
uart = busio.UART(...)
uart.write(bytes((254,1))
# or more compactly:
uart.write(b'\xfe\x01') # hex values for (254, 1)
- hotcarrier
- Posts: 31
- Joined: Wed Oct 23, 2013 4:44 pm
Re: Serial LCD
@danhalbert That works, thanks!
Please be positive and constructive with your questions and comments.