Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add extra commands? #33

Open
dsssssssss9 opened this issue May 9, 2021 · 2 comments
Open

How to add extra commands? #33

dsssssssss9 opened this issue May 9, 2021 · 2 comments

Comments

@dsssssssss9
Copy link

dsssssssss9 commented May 9, 2021

HI

novice programmer here so please excuse the stupid question

Looking through the lcd_api.py code i notice there seem to be some command codes that have not had any functions defined to use them ( for example LCD_MOVE_DISP) .

I have tried to define functions to implement these but so far zero success

any advice would be gratefully received - i have read the data sheet for the controller but lack the ability to translate the information contained into working code it seems

regards

J

@davehylands
Copy link
Collaborator

Looking at the instructions it looks like the LCD_MOVE command changes what happens when characters are output. I haven't played with these to see how the display reacts, so you'd need to experiment a bit.

You could easily add a command like (untested):

def set_move_mode(self, move_display, move_right):
    move = 0
    if move_display:
        move |= self.LCD_MOVE_DISP
    if move_right:
        move |= self.LCD_MOVE_RIGHT
    self.hal_write_command(self.LCD_MOVE | move)

There are probably additional things required as changing the move mode will have ramifications on how the cursor position needs to be updated.

@dsssssssss9
Copy link
Author

dsssssssss9 commented May 11, 2021

Hi
thanks for the reply & hints

bit above my current level ( or lack of ) programming talent so looks like i got a bit of learning / experimentation to come over the next few days?

I am very grateful to you for pointing me in the right direction though!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants