Hi @deroses
Please use the following link to help you with your code:
lcd — lcd driver — MicroPython 1.20 documentation
Functions
lcd. init ([ type=1 ])
Initializes an attached lcd shield using I/O pins P0, P2, P3, P6, P7, and P8.
type indicates the type of lcd shield (for future use possibly):
- 0: None
- 1: lcd shield