1

I'm trying to use a LCD display 16x2 (based on Hitachi HD44780) with 4-bit I²C interface (based on PCF8574) on an ESP8266 NodeMCU V.3 (ESP-12E) and when I load the liquidcrystal.lua library (by Matsievskiy Sergey on GitHub) I get the following error:

Error loading module 'liquidcrystal' from file 'liquidcrystal.lua': not enough memory

Looking at the heap I have 21208 remaining bytes.

Here is the code in init.lua (only two lines):

backend_meta = require("lc-i2c4bit")
lc_meta = require("liquidcrystal")

I uploaded the lc-i2c4bit.lua and liquidcrystal.lua files to the root of the MCU.

How can I solve this problem?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
  • Why do you think that 21208 bytes should be enough to load the "liquidcrystal" module? – mkrieger1 Jul 19 '22 at 15:44
  • Hi mkrieger1, I'm using an ESP12E, which should have enough memory, in addition I see that I have 21Kb free in the Heap after restart. In the examples of using this module (MCU ESP-12E NodeMCU v3 with Hitachi HD44780 module) I didn't find any failure reports due to lack of space using the mentioned libraries (lc-i2c4bit.lua and liquidcrystal.lua). I also tried to decrease the amount of memory used by removing global variables and functions keeping only the basics at least for a simple testing but with no success. – Marcelo de Oliveira Jul 20 '22 at 21:22

0 Answers0