Hi, I'm using the python mLink library with my Pi 4 model B to control the mlink 20x4 LCD display (bought from HC!)
I've slowed the I2C bus as recommended.
Printing text is working fine but the cursor position command has no effect (no error; no change of cursor position). I tried a delay afterwards, but no change.
Any ideas what is wrong?
Sample code here:
import time
from mLink import mLink
ml = mLink.mLink(1)
ml.cLCD_dispType(0x56, 1)
ml.cLCD_Clear(0x56)
ml.cLCD_Print(0x56, "Hello World xx")
ml.cLCD_Cursor = (0x56, 3, 3)
time.sleep(1)
current_time = time.strftime('%H:%M:%S')
ml.cLCD_Print(0x56, f'Time: {current_time}')
mLink 20x4 LCD display with Raspberry Pi - Cursor position not working
Re: mLink 20x4 LCD display with Raspberry Pi - Cursor position not working
Any ideas what is wrong?
Yes, the issue is caused by the equals sign (=) in your code. You should change this line:
- ml.cLCD_Cursor = (0x56, 3, 3)
- ml.cLCD_Cursor(0x56, 3, 3)
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
Re: mLink 20x4 LCD display with Raspberry Pi - Cursor position not working
Thank you!
Corrected and working - I'm feeling very stupid right now...
Ed
Corrected and working - I'm feeling very stupid right now...
Ed
Re: mLink 20x4 LCD display with Raspberry Pi - Cursor position not working
It's ok, I didn't spot it straight away. TBH, I'm surprised it didn't throw a syntax error.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.