• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

RedFoxCub

Q&A Forum › Category: Other › RedFoxCub
0 Vote Up Vote Down
Michael Larthwell asked 4 months ago

MicroPython: ESP32 Cheap Yellow Display Board – CYD (ESP32-2432S028R)
With reference to your tutorial on the above I’m having difficulty in using the img2rgb565.py tool which references several imports which are not available to micropython. Is there an app you can give me to develop a RAW image that will be accepted by your given software.
 

5 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 4 months ago

Hello Michael,
The img2rgb565.py file must run directly with Python on your computer (not with MicroPython). So, open the Python file on your compute and run the script to get the raw file.
Regards,
Rui

0 Vote Up Vote Down
Michael Larthwell answered 4 months ago

Hi Rui
Thanks for the prompt response, however 
 when I run python the : import PIL.  causes this error:

Traceback (most recent call last):
  ImportError: No module named PIL

Looking into the reason it appears that
the Python Imaging Library (PIL), is no longer maintained
Any suggestions?

Mike

0 Vote Up Vote Down
Rui Santos Staff answered 4 months ago

If it’s not installed, you need to install the PIL (pillow) python package:

pip install pillow

You can also watch this video on how to install PIL: https://www.youtube.com/watch?v=5V_MxQ6HjpY

0 Vote Up Vote Down
Michael Larthwell answered 4 months ago

Thanks Rui
That works.
One final question on the same subject. Do the image files that are to  be converted need to be a specific size i.e in pixel dimensions such as 128×128
Mike
 

0 Vote Up Vote Down
Rui Santos Staff answered 4 months ago

If I remember correctly, you must use an image with the final dimensions that you want but there’s no specific size required. It can be 100×200… or 300×150, it’s up to you. 
Example: if you want a 200×150 pixels image, you must convert one image with those dimensions. Then, in the CYD code you need to passe the 200, 150 as parameters:

def load_image():
     display.draw_image('your_image.raw', 0, 0, 200, 150)

Example under the “Loading Image on the Display – Code” section:

  • MicroPython: ESP32 Cheap Yellow Display Board – CYD (ESP32-2432S028R)

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.