Python Forum
Write to a LCD display using i2c to a Raspberry Pi using i2c 6398 4x20 LCD - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Write to a LCD display using i2c to a Raspberry Pi using i2c 6398 4x20 LCD (/thread-37054.html)



Write to a LCD display using i2c to a Raspberry Pi using i2c 6398 4x20 LCD - Aggie64 - Apr-28-2022

I have been unable to find out how to write normal ascii data to a LCD display using i2c.
One of the code snippets I have tried is:
Bus=smbus,SMBus(1)
Bus.write_byte_data(addr,register,value)
and
Bus.write_block_data(addr,register,value1,value2,value3)
How do I write ascii data to the LCD display
The value variables are integers and I want to write ascii data such as "Time=02:34:45"
I am trying to write strings of data to the LCD display and cannot fine any help to do this.
Any responses will be most appreciated.


RE: Write to a LCD display using i2c to a Raspberry Pi using i2c 6398 4x20 LCD - Aggie64 - Apr-28-2022

the 6398 is a typo which should not be there


RE: Write to a LCD display using i2c to a Raspberry Pi using i2c 6398 4x20 LCD - bowlofred - Apr-28-2022

I wouldn't expect most character LCDs to speak i2c. Do you have one from Adafruit or similar? They have a library for their i2c backpack that you might be able to use. Have you tried that?


RE: Write to a LCD display using i2c to a Raspberry Pi using i2c 6398 4x20 LCD - Aggie64 - Apr-28-2022

(Apr-28-2022, 03:10 AM)bowlofred Wrote: I wouldn't expect most character LCDs to speak i2c. Do you have one from Adafruit or similar? They have a library for their i2c backpack that you might be able to use. Have you tried that?



RE: Write to a LCD display using i2c to a Raspberry Pi using i2c 6398 4x20 LCD - Aggie64 - Apr-28-2022

my LCD is from sparkfun and I also have one from New Haven.

I don't understand why I can't find an example of writing ascii characters on an i2c bus to a character LCD display.
I will take a look at the adafruit i2c backpack library, thanks.