Hi. Trying to set up an I2C RGB 16x2 LCD https://www.waveshare.com/wiki/LCD1602_RGB_Module with my CPX using adafruit_character_lcd.character_lcd
Using CircuitPyhon 7.0.0 and 7.0.0 Libraries (see screenshot) and getting error as below.
Any thoughts please?
-----------------------------------------]
Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit CircuitPlayground Express with samd21g18
>>> import time
>>> import board
>>> import adafruit_character_lcd.character_lcd_i2c as character_lcd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_character_lcd/character_lcd_i2c.py", line 32, in <module>
File "adafruit_character_lcd/character_lcd.py", line 100, in <module>
File "adafruit_character_lcd/character_lcd.py", line 312, in Character_LCD
MemoryError: memory allocation failed, allocating 136 byte
>>>
CircuitPython on the CPX with a character lcd
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mkingdom
- Posts: 5
- Joined: Fri Oct 28, 2016 1:14 pm
- danhalbert
- Posts: 4653
- Joined: Tue Aug 08, 2017 12:37 pm
Re: CircuitPython on the CPX with a character lcd
The CPX has a limited amount of RAM. Unfortunately, some libraries simply don't fit as is. (The amount of free space in CIRCUITPY does not affect that.) You could try pruning down the character LCD library to include only what you need.
Please be positive and constructive with your questions and comments.