Home

Awesome

LCM1602A-14 LCD MicroPython Library for Pi Pico

3 2

This library supports LCM1602A-14 LCD module I2C and SPI communication with Raspberry Pi Pico.

ww

The library file must be saved inside the Raspberry Pi Pico before uploading user's code

Add Library

Step 1: Download the library file (LCD_SPI.py or LCD_I2C.py)

Step 2: Launch Thonny application and open the library file A

Step 3: Save the library file into the Pi Pico

b

d

Step 4: Save the library with the same name you downloaded with (LCD_SPI.py or LCD_I2C.py) Must add .py at the back

c

Click OK and the library is added to your Pi Pico

Import LCD_SPI Library

from LCD_SPI import *

Import LCD_I2C Library

from LCD_I2C import *

Create Object for SPI

lcd = LCD(sck=2, tx=3, cs=5)

Create Object for I2C

lcd = LCD(sda=2, scl=3)

Set cursor

lcd.set_cursor(0,0)

On LCD Display

lcd.on()

lcd.on(cursor=True, blink=False)

lcd.on(cursor=False, blink=True)

lcd.on(cursor=True, blink=True)

Off LCD Display

lcd.off()

Write to LCD Display

lcd.write("Hello World")

Clear LCD Display

lcd.clear()