Introduction: Custom Characters With Raspberry Pi Pico and LCD 16*2 Display

Writing your own custom characters on an LCD display is fun, so i will teach you how to do it by yourself.

Let's begin.

Step 1: Required Components

  1. Raspberry Pi Pico
  2. 16*2 LCD Display and its i2c adapter
  3. breadboard
  4. Some Jumper wires

Step 2: Wiring

Connect the i2c adapter to 16*2 LCD display

  1. SCL-Pin 2 (GP1)
  2. SDA-Pin 1(GPO)
  3. VCC-Pin 40(VBUS)
  4. GND-Pin 38 (GND)

Step 3: Coding

We are done with the wiring, so let us startthe coding of pi pico

1. You can download Thonny for programing your pi pico.

2. After opening Thonny go to>Tools> Options> Interpreter, select Raspberry Pi Pico as the Interpreter.

We need Libraries and drivers to control the LCD display.

You can download the libraries from

https://github.com/T-622/RPI-PICO-I2C-LCD

· Before running the test code we need to check one thing that is, using the i2c protocol requires us to enter the address of the LCD. So let us check the address of your LCD, so let's begin.

Download this Code to check the address. After saving it to your file and running it, your computer displays a number but this is in decimal form but we need it in the hex form.

Decimal to hex converter.

Type your address in the test code and run it. If it works then you can create custom characters of our own.

Step 4: Custom Characters and Letters

Use this code to write your custom letters

import machine

from machine import I2C

from lcd_api import LcdApi

from pico_i2c_lcd import I2cLcd

I2C_ADDR = 0x27

I2C_NUM_ROWS = 4

I2C_NUM_COLS = 20

i2c = I2C(0, sda=machine.Pin(0), scl=machine.Pin(1), freq=400000)

lcd = I2cLcd(i2c, I2C_ADDR, I2C_NUM_ROWS, I2C_NUM_COLS)

lcd.clear(_)

lcd.move_to(0,5)

lcd.putstr("Hello")

lcd.move_to(0,5)

lcd.putstr("World!")

You just need to change the last four lines to write your own words or letters.

You can use LCD custom character creator for your ease.

write the given code in the main loop of the code and that's it.

You can create your own custom words and letters with Raspberry pi pico and 16*2 LCD display.