Simple tests
Ensure your device works with these simple tests.
Mono
examples/charlcd_mono_simpletest.py
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4"""Simple test for monochromatic character LCD"""
5
6import time
7
8import board
9import digitalio
10
11import adafruit_character_lcd.character_lcd as characterlcd
12
13# Modify this if you have a different sized character LCD
14lcd_columns = 16
15lcd_rows = 2
16
17# Metro M0/M4 Pin Config:
18lcd_rs = digitalio.DigitalInOut(board.D7)
19lcd_en = digitalio.DigitalInOut(board.D8)
20lcd_d7 = digitalio.DigitalInOut(board.D12)
21lcd_d6 = digitalio.DigitalInOut(board.D11)
22lcd_d5 = digitalio.DigitalInOut(board.D10)
23lcd_d4 = digitalio.DigitalInOut(board.D9)
24lcd_backlight = digitalio.DigitalInOut(board.D13)
25
26# Initialise the LCD class
27lcd = characterlcd.Character_LCD_Mono(
28 lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7, lcd_columns, lcd_rows, lcd_backlight
29)
30
31# Turn backlight on
32lcd.backlight = True
33# Print a two line message
34lcd.message = "Hello\nCircuitPython"
35# Wait 5s
36time.sleep(5)
37lcd.clear()
38# Print two line message right to left
39lcd.text_direction = lcd.RIGHT_TO_LEFT
40lcd.message = "Hello\nCircuitPython"
41# Wait 5s
42time.sleep(5)
43# Return text direction to left to right
44lcd.text_direction = lcd.LEFT_TO_RIGHT
45# Display cursor
46lcd.clear()
47lcd.cursor = True
48lcd.message = "Cursor! "
49# Wait 5s
50time.sleep(5)
51# Display blinking cursor
52lcd.clear()
53lcd.blink = True
54lcd.message = "Blinky Cursor!"
55# Wait 5s
56time.sleep(5)
57lcd.blink = False
58lcd.clear()
59# Create message to scroll
60scroll_msg = "<-- Scroll"
61lcd.message = scroll_msg
62# Scroll message to the left
63for i in range(len(scroll_msg)):
64 time.sleep(0.5)
65 lcd.move_left()
66lcd.clear()
67lcd.message = "Going to sleep\nCya later!"
68time.sleep(3)
69# Turn backlight off
70lcd.backlight = False
71time.sleep(2)
RGB
examples/charlcd_rgb_simpletest.py
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4"""Simple test for RGB character LCD"""
5
6import time
7
8import board
9import digitalio
10import pwmio
11
12import adafruit_character_lcd.character_lcd as characterlcd
13
14# Modify this if you have a different sized character LCD
15lcd_columns = 16
16lcd_rows = 2
17
18# Metro M0/M4 Pin Config:
19lcd_rs = digitalio.DigitalInOut(board.D7)
20lcd_en = digitalio.DigitalInOut(board.D8)
21lcd_d7 = digitalio.DigitalInOut(board.D12)
22lcd_d6 = digitalio.DigitalInOut(board.D11)
23lcd_d5 = digitalio.DigitalInOut(board.D10)
24lcd_d4 = digitalio.DigitalInOut(board.D9)
25red = pwmio.PWMOut(board.D3)
26green = pwmio.PWMOut(board.D5)
27blue = pwmio.PWMOut(board.D6)
28
29# Initialise the LCD class
30lcd = characterlcd.Character_LCD_RGB(
31 lcd_rs,
32 lcd_en,
33 lcd_d4,
34 lcd_d5,
35 lcd_d6,
36 lcd_d7,
37 lcd_columns,
38 lcd_rows,
39 red,
40 green,
41 blue,
42)
43
44lcd.clear()
45# Set LCD color to red
46lcd.color = [100, 0, 0]
47time.sleep(1)
48# Print two line message
49lcd.message = "Hello\nCircuitPython"
50# Wait 5s
51time.sleep(5)
52# Set LCD color to blue
53lcd.color = [0, 100, 0]
54time.sleep(1)
55# Set LCD color to green
56lcd.color = [0, 0, 100]
57time.sleep(1)
58# Set LCD color to purple
59lcd.color = [50, 0, 50]
60time.sleep(1)
61lcd.clear()
62# Print two line message right to left
63lcd.text_direction = lcd.RIGHT_TO_LEFT
64lcd.message = "Hello\nCircuitPython"
65# Wait 5s
66time.sleep(5)
67# Return text direction to left to right
68lcd.text_direction = lcd.LEFT_TO_RIGHT
69# Display cursor
70lcd.clear()
71lcd.cursor = True
72lcd.message = "Cursor! "
73# Wait 5s
74time.sleep(5)
75# Display blinking cursor
76lcd.clear()
77lcd.blink = True
78lcd.message = "Blinky Cursor!"
79# Wait 5s
80time.sleep(5)
81lcd.blink = False
82lcd.clear()
83# Create message to scroll
84scroll_msg = "<-- Scroll"
85lcd.message = scroll_msg
86# Scroll to the left
87for i in range(len(scroll_msg)):
88 time.sleep(0.5)
89 lcd.move_left()
90lcd.clear()
91time.sleep(1)
92lcd.message = "Going to sleep\nCya later!"
93time.sleep(5)
94# Turn off LCD backlights and clear text
95lcd.color = [0, 0, 0]
96lcd.clear()
I2C Mono
examples/charlcd_i2c_mono_simpletest.py
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4"""Simple test for 16x2 character lcd connected to an MCP23008 I2C LCD backpack."""
5
6import time
7
8import board
9
10import adafruit_character_lcd.character_lcd_i2c as character_lcd
11
12# Modify this if you have a different sized Character LCD
13lcd_columns = 16
14lcd_rows = 2
15
16# Initialise I2C bus.
17i2c = board.I2C() # uses board.SCL and board.SDA
18# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
19
20# Initialise the lcd class
21lcd = character_lcd.Character_LCD_I2C(i2c, lcd_columns, lcd_rows)
22
23# Turn backlight on
24lcd.backlight = True
25# Print a two line message
26lcd.message = "Hello\nCircuitPython"
27# Wait 5s
28time.sleep(5)
29lcd.clear()
30# Print two line message right to left
31lcd.text_direction = lcd.RIGHT_TO_LEFT
32lcd.message = "Hello\nCircuitPython"
33# Wait 5s
34time.sleep(5)
35# Return text direction to left to right
36lcd.text_direction = lcd.LEFT_TO_RIGHT
37# Display cursor
38lcd.clear()
39lcd.cursor = True
40lcd.message = "Cursor! "
41# Wait 5s
42time.sleep(5)
43# Display blinking cursor
44lcd.clear()
45lcd.blink = True
46lcd.message = "Blinky Cursor!"
47# Wait 5s
48time.sleep(5)
49lcd.blink = False
50lcd.clear()
51# Create message to scroll
52scroll_msg = "<-- Scroll"
53lcd.message = scroll_msg
54# Scroll message to the left
55for i in range(len(scroll_msg)):
56 time.sleep(0.5)
57 lcd.move_left()
58lcd.clear()
59lcd.message = "Going to sleep\nCya later!"
60time.sleep(5)
61# Turn backlight off
62lcd.backlight = False
63time.sleep(2)
I2C RGB
examples/charlcd_i2c_rgb_simpletest.py
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4"""Simple test for I2C RGB character LCD shield kit"""
5
6import time
7
8import board
9
10import adafruit_character_lcd.character_lcd_rgb_i2c as character_lcd
11
12# Modify this if you have a different sized Character LCD
13lcd_columns = 16
14lcd_rows = 2
15
16# Initialise I2C bus.
17i2c = board.I2C() # uses board.SCL and board.SDA
18# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
19
20# Initialise the LCD class
21lcd = character_lcd.Character_LCD_RGB_I2C(i2c, lcd_columns, lcd_rows)
22
23lcd.clear()
24# Set LCD color to red
25lcd.color = [100, 0, 0]
26time.sleep(1)
27# Print two line message
28lcd.message = "Hello\nCircuitPython"
29# Wait 5s
30time.sleep(5)
31# Set LCD color to blue
32lcd.color = [0, 100, 0]
33time.sleep(1)
34# Set LCD color to green
35lcd.color = [0, 0, 100]
36time.sleep(1)
37# Set LCD color to purple
38lcd.color = [50, 0, 50]
39time.sleep(1)
40lcd.clear()
41# Print two line message right to left
42lcd.text_direction = lcd.RIGHT_TO_LEFT
43lcd.message = "Hello\nCircuitPython"
44# Wait 5s
45time.sleep(5)
46# Return text direction to left to right
47lcd.text_direction = lcd.LEFT_TO_RIGHT
48# Display cursor
49lcd.clear()
50lcd.cursor = True
51lcd.message = "Cursor! "
52# Wait 5s
53time.sleep(5)
54# Display blinking cursor
55lcd.clear()
56lcd.blink = True
57lcd.message = "Blinky Cursor!"
58# Wait 5s
59time.sleep(5)
60lcd.blink = False
61lcd.clear()
62# Create message to scroll
63scroll_msg = "<-- Scroll"
64lcd.message = scroll_msg
65# Scroll to the left
66for i in range(len(scroll_msg)):
67 time.sleep(0.5)
68 lcd.move_left()
69lcd.clear()
70time.sleep(1)
71lcd.message = "Going to sleep\nCya later!"
72time.sleep(5)
73# Turn off LCD backlights and clear text
74lcd.color = [0, 0, 0]
75lcd.clear()
SPI Mono
examples/charlcd_spi_mono_simpletest.py
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4"""Simple test for 16x2 character LCD connected to 74HC595 SPI LCD backpack."""
5
6import time
7
8import board
9import busio
10import digitalio
11
12import adafruit_character_lcd.character_lcd_spi as character_lcd
13
14# Modify this if you have a different sized character LCD
15lcd_columns = 16
16lcd_rows = 2
17
18# Backpack connection configuration:
19clk = board.SCK # Pin connected to backpack CLK.
20data = board.MOSI # Pin connected to backpack DAT/data.
21latch = board.D5 # Pin connected to backpack LAT/latch.
22
23# Initialise SPI bus.
24spi = busio.SPI(clk, MOSI=data)
25
26# Initialise the LCD class
27latch = digitalio.DigitalInOut(latch)
28lcd = character_lcd.Character_LCD_SPI(spi, latch, lcd_columns, lcd_rows)
29
30# Turn backlight on
31lcd.backlight = True
32# Print a two line message
33lcd.message = "Hello\nCircuitPython"
34# Wait 5s
35time.sleep(5)
36lcd.clear()
37# Print two line message right to left
38lcd.text_direction = lcd.RIGHT_TO_LEFT
39lcd.message = "Hello\nCircuitPython"
40# Wait 5s
41time.sleep(5)
42# Return text direction to left to right
43lcd.text_direction = lcd.LEFT_TO_RIGHT
44# Display cursor
45lcd.clear()
46lcd.cursor = True
47lcd.message = "Cursor! "
48# Wait 5s
49time.sleep(5)
50# Display blinking cursor
51lcd.clear()
52lcd.blink = True
53lcd.message = "Blinky Cursor!"
54# Wait 5s
55time.sleep(5)
56lcd.blink = False
57lcd.clear()
58# Create message to scroll
59scroll_msg = "<-- Scroll"
60lcd.message = scroll_msg
61# Scroll message to the left
62for i in range(len(scroll_msg)):
63 time.sleep(0.5)
64 lcd.move_left()
65lcd.clear()
66lcd.message = "Going to sleep\nCya later!"
67# Turn backlight off
68lcd.backlight = False
69time.sleep(2)
Keypad
examples/charlcd_keypad_simpletest.py
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4"""Simple test for keypad on I2C RGB character LCD Shield or Pi Plate kits"""
5
6import time
7
8import board
9
10import adafruit_character_lcd.character_lcd_rgb_i2c as character_lcd
11
12# Modify this if you have a different sized Character LCD
13lcd_columns = 16
14lcd_rows = 2
15
16# Initialise I2C bus.
17i2c = board.I2C() # uses board.SCL and board.SDA
18# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
19
20# Initialise the LCD class
21lcd = character_lcd.Character_LCD_RGB_I2C(i2c, lcd_columns, lcd_rows)
22
23lcd.clear()
24lcd.color = [100, 0, 0]
25while True:
26 if lcd.left_button:
27 print("Left!")
28 lcd.message = "Left!"
29
30 elif lcd.up_button:
31 print("Up!")
32 lcd.message = "Up!"
33
34 elif lcd.down_button:
35 print("Down!")
36 lcd.message = "Down!"
37
38 elif lcd.right_button:
39 print("Right!")
40 lcd.message = "Right!"
41
42 elif lcd.select_button:
43 print("Select!")
44 lcd.message = "Select!"
45
46 else:
47 time.sleep(0.1)
48 lcd.clear()
Raspberry Pi Mono
examples/charlcd_rpi_mono_simpletest.py
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4"""Simple test for monochromatic character LCD on Raspberry Pi"""
5
6import time
7
8import board
9import digitalio
10
11import adafruit_character_lcd.character_lcd as characterlcd
12
13# Modify this if you have a different sized character LCD
14lcd_columns = 16
15lcd_rows = 2
16
17# Raspberry Pi Pin Config:
18lcd_rs = digitalio.DigitalInOut(board.D26)
19lcd_en = digitalio.DigitalInOut(board.D19)
20lcd_d7 = digitalio.DigitalInOut(board.D27)
21lcd_d6 = digitalio.DigitalInOut(board.D22)
22lcd_d5 = digitalio.DigitalInOut(board.D24)
23lcd_d4 = digitalio.DigitalInOut(board.D25)
24lcd_backlight = digitalio.DigitalInOut(board.D4)
25
26# Initialise the lcd class
27lcd = characterlcd.Character_LCD_Mono(
28 lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7, lcd_columns, lcd_rows, lcd_backlight
29)
30
31# Turn backlight on
32lcd.backlight = True
33# Print a two line message
34lcd.message = "Hello\nCircuitPython"
35# Wait 5s
36time.sleep(5)
37lcd.clear()
38# Print two line message right to left
39lcd.text_direction = lcd.RIGHT_TO_LEFT
40lcd.message = "Hello\nCircuitPython"
41# Wait 5s
42time.sleep(5)
43# Return text direction to left to right
44lcd.text_direction = lcd.LEFT_TO_RIGHT
45# Display cursor
46lcd.clear()
47lcd.cursor = True
48lcd.message = "Cursor! "
49# Wait 5s
50time.sleep(5)
51# Display blinking cursor
52lcd.clear()
53lcd.blink = True
54lcd.message = "Blinky Cursor!"
55# Wait 5s
56time.sleep(5)
57lcd.blink = False
58lcd.clear()
59# Create message to scroll
60scroll_msg = "<-- Scroll"
61lcd.message = scroll_msg
62# Scroll message to the left
63for i in range(len(scroll_msg)):
64 time.sleep(0.5)
65 lcd.move_left()
66lcd.clear()
67lcd.message = "Going to sleep\nCya later!"
68# Turn backlight off
69lcd.backlight = False
70time.sleep(2)
Raspberry Pi RGB
examples/charlcd_rpi_rgb_simpletest.py
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4"""Simple test for RGB character LCD on Raspberry Pi"""
5
6import time
7
8import board
9import digitalio
10import pwmio
11
12import adafruit_character_lcd.character_lcd as characterlcd
13
14# Modify this if you have a different sized character LCD
15lcd_columns = 16
16lcd_rows = 2
17
18# Raspberry Pi Pin Config:
19lcd_rs = digitalio.DigitalInOut(board.D26) # LCD pin 4
20lcd_en = digitalio.DigitalInOut(board.D19) # LCD pin 6
21lcd_d7 = digitalio.DigitalInOut(board.D27) # LCD pin 14
22lcd_d6 = digitalio.DigitalInOut(board.D22) # LCD pin 13
23lcd_d5 = digitalio.DigitalInOut(board.D24) # LCD pin 12
24lcd_d4 = digitalio.DigitalInOut(board.D25) # LCD pin 11
25lcd_rw = digitalio.DigitalInOut(
26 board.D4
27) # LCD pin 5. Determines whether to read to or write from the display.
28# Not necessary if only writing to the display. Used on shield.
29
30red = pwmio.PWMOut(board.D21)
31green = pwmio.PWMOut(board.D12)
32blue = pwmio.PWMOut(board.D18)
33
34# Initialize the LCD class
35# The lcd_rw parameter is optional. You can omit the line below if you're only
36# writing to the display.
37lcd = characterlcd.Character_LCD_RGB(
38 lcd_rs,
39 lcd_en,
40 lcd_d4,
41 lcd_d5,
42 lcd_d6,
43 lcd_d7,
44 lcd_columns,
45 lcd_rows,
46 red,
47 green,
48 blue,
49 lcd_rw,
50)
51
52RED = [100, 0, 0]
53GREEN = [0, 100, 0]
54BLUE = [0, 0, 100]
55
56while True:
57 lcd.clear()
58 # Set LCD color to red
59 lcd.color = [100, 0, 0]
60 time.sleep(1)
61
62 # Print two line message
63 lcd.message = "Hello\nCircuitPython"
64
65 # Wait 5s
66 time.sleep(5)
67
68 # Set LCD color to blue
69 lcd.color = [0, 100, 0]
70 time.sleep(1)
71 # Set LCD color to green
72 lcd.color = [0, 0, 100]
73 time.sleep(1)
74 # Set LCD color to purple
75 lcd.color = [50, 0, 50]
76 time.sleep(1)
77 lcd.clear()
78
79 # Print two line message right to left
80 lcd.text_direction = lcd.RIGHT_TO_LEFT
81 lcd.message = "Hello\nCircuitPython"
82 # Wait 5s
83 time.sleep(5)
84
85 # Return text direction to left to right
86 lcd.text_direction = lcd.LEFT_TO_RIGHT
87
88 # Display cursor
89 lcd.clear()
90 lcd.cursor = True
91 lcd.message = "Cursor! "
92 # Wait 5s
93 time.sleep(5)
94
95 # Display blinking cursor
96 lcd.clear()
97 lcd.blink = True
98 lcd.message = "Blinky Cursor!"
99 # Wait 5s
100 time.sleep(5)
101 lcd.blink = False
102 lcd.clear()
103
104 # Create message to scroll
105 scroll_msg = "<-- Scroll"
106 lcd.message = scroll_msg
107 # Scroll to the left
108 for i in range(len(scroll_msg)):
109 time.sleep(0.5)
110 lcd.move_left()
111 lcd.clear()
112
113 # Turn off LCD backlights and clear text
114 lcd.color = [0, 0, 0]
115 lcd.clear()
116 time.sleep(1)
Other tests
Custom Character
examples/charlcd_customcharacter.py
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4"""Display a custom character"""
5
6import board
7import digitalio
8
9import adafruit_character_lcd.character_lcd as characterlcd
10
11# Modify this if you have a different sized character LCD
12lcd_columns = 16
13lcd_rows = 2
14
15# Metro M0/M4 Pin Config:
16lcd_rs = digitalio.DigitalInOut(board.D7)
17lcd_en = digitalio.DigitalInOut(board.D8)
18lcd_d7 = digitalio.DigitalInOut(board.D12)
19lcd_d6 = digitalio.DigitalInOut(board.D11)
20lcd_d5 = digitalio.DigitalInOut(board.D10)
21lcd_d4 = digitalio.DigitalInOut(board.D9)
22lcd_backlight = digitalio.DigitalInOut(board.D13)
23
24# Initialise the LCD class
25lcd = characterlcd.Character_LCD_Mono(
26 lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7, lcd_columns, lcd_rows, lcd_backlight
27)
28
29checkmark = bytes([0x0, 0x0, 0x1, 0x3, 0x16, 0x1C, 0x8, 0x0])
30
31# Store in LCD character memory 0
32lcd.create_char(0, checkmark)
33
34lcd.clear()
35lcd.message = "\x00 Success \x00"
Nyan Cat
examples/charlcd_custom_character_nyan_cat.py
1# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
2# SPDX-License-Identifier: MIT
3
4"""Use custom characters to display Nyan cat"""
5
6import time
7
8import board
9import digitalio
10
11import adafruit_character_lcd.character_lcd as characterlcd
12
13# Modify this if you have a different sized character LCD
14lcd_columns = 16
15lcd_rows = 2
16
17# Metro M0/M4 Pin Config:
18lcd_rs = digitalio.DigitalInOut(board.D7)
19lcd_en = digitalio.DigitalInOut(board.D8)
20lcd_d7 = digitalio.DigitalInOut(board.D12)
21lcd_d6 = digitalio.DigitalInOut(board.D11)
22lcd_d5 = digitalio.DigitalInOut(board.D10)
23lcd_d4 = digitalio.DigitalInOut(board.D9)
24lcd_backlight = digitalio.DigitalInOut(board.D13)
25
26# Initialise the LCD class
27lcd = characterlcd.Character_LCD_Mono(
28 lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7, lcd_columns, lcd_rows, lcd_backlight
29)
30
31head = [31, 17, 27, 17, 17, 21, 17, 31]
32
33top_body = [31, 0, 31, 0, 18, 8, 2, 8]
34top_left_corner_body = [31, 16, 16, 17, 22, 20, 20, 20]
35top_right_corner_body = [31, 1, 1, 17, 13, 5, 5, 5]
36
37# these three chars will be the above three reversed with a few minor changes to
38# fit feet into the bottom
39bot_body = []
40bot_left_corner_body = []
41bot_right_corner_body = []
42
43tail_neutral = [0, 0, 0, 0, 31, 31, 0, 0]
44tail_up = [0, 8, 12, 6, 3, 1, 0, 0]
45
46for i in range(7, -1, -1):
47 bot_body.append(top_body[i])
48 bot_left_corner_body.append(top_left_corner_body[i])
49 bot_right_corner_body.append(top_right_corner_body[i])
50
51# adding feet and making space for them
52
53bot_body[6] = 31
54bot_body[5] = 0
55bot_body[4] = 31
56bot_body[7] = 24
57bot_left_corner_body[7] = 0
58bot_left_corner_body[6] = 31
59bot_left_corner_body[7] = 28
60bot_right_corner_body[7] = 0
61bot_right_corner_body[6] = 31
62
63# bottom body with feet forward
64bot_body2 = bot_body[:-1] + [3]
65
66
67rainbow = [0, 0, 6, 25, 11, 29, 27, 12]
68rainbow2 = [0, 0, 6, 31, 13, 5, 23, 12]
69
70lcd.create_char(0, top_body)
71lcd.create_char(1, top_left_corner_body)
72lcd.create_char(2, rainbow)
73lcd.create_char(3, bot_left_corner_body)
74lcd.create_char(4, bot_body)
75lcd.create_char(5, bot_right_corner_body)
76lcd.create_char(6, head)
77lcd.create_char(7, tail_neutral)
78
79lcd.clear()
80
81lcd.move_right()
82lcd.message = "\x02\x02\x02\x02\x01\x00\x00\x00\x06\n\x02\x02\x02\x07\x03\x04\x04\x04\x05"
83
84lcd.backlight = True
85
86while True:
87 lcd.create_char(4, bot_body2)
88 lcd.create_char(7, tail_up)
89 lcd.create_char(2, rainbow2)
90 lcd.move_right()
91 time.sleep(0.4)
92 lcd.create_char(4, bot_body)
93 lcd.create_char(7, tail_neutral)
94 lcd.create_char(2, rainbow)
95 lcd.move_left()
96 time.sleep(0.4)