Serial LCD

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
hotcarrier
 
Posts: 31
Joined: Wed Oct 23, 2013 4:44 pm

Serial LCD

Post by hotcarrier »

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?

User avatar
danhalbert
 
Posts: 4655
Joined: Tue Aug 08, 2017 12:37 pm

Re: Serial LCD

Post by danhalbert »


User avatar
hotcarrier
 
Posts: 31
Joined: Wed Oct 23, 2013 4:44 pm

Re: Serial LCD

Post by hotcarrier »

@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?

User avatar
danhalbert
 
Posts: 4655
Joined: Tue Aug 08, 2017 12:37 pm

Re: Serial LCD

Post by danhalbert »

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)

User avatar
hotcarrier
 
Posts: 31
Joined: Wed Oct 23, 2013 4:44 pm

Re: Serial LCD

Post by hotcarrier »

@danhalbert That works, thanks!

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”