Closed erickcrus closed 5 years ago
This is because the file lcd.py is not available in the library path (or current path). Have a look to the /ILI9341 subfolder... the file lcd.py must be accessible to search path. Kind regards, Dominique
It imports the lcd.py module normally, but does not find the classes within the module. When I use the class, it says that it was not found. Here's my list of files on the board:
sh-3.2# ampy ls
/boot.py
sh-3.2# ampy put colors.py
sh-3.2# ampy put decorators.py
sh-3.2# ampy put exceptions.py
sh-3.2# ampy put lcd.py
sh-3.2# ampy put registers.py
sh-3.2# ampy put tests.py
sh-3.2# ampy mkdir images
sh-3.2# ampy mkdir fonts
sh-3.2# ampy put fonts fonts
sh-3.2# ampy put images
sh-3.2# ampy ls
/boot.py
/colors.py
/decorators.py
/exceptions.py
/fonts
/images
/lcd.py
/registers.py
/tests.py
In uPyCraft console, this is the output:
>>> from lcd import *
>>> lcd = LCD( rate=21000000 )
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'LCD' isn't defined
>>>
The LCD class is there (ligne 294). You should be able to type from lcd import LCD
Maybe don't you have enough ressource on your MicroControler. Are you using a Genuine Pyboard?
Oups! Line 924.
I am trying to use the library on a NodeMCU ESP8266, that's why it doesn't work?
For sure! The library have been developed for the Pyboard which have quite more memory.
that sad :( Thank you so much friend
I copied all files and folders inside the ILI9341 folder, but when running test script 01a_first_step.py, I get the second message: "NameError: name 'LCD' is not defined"
01a_first_step.p: