Scrolling Text and Picture on an LED Neo Pixel / Neo Matrix Display

by suriono in Circuits > Arduino

537 Views, 2 Favorites, 0 Comments

Scrolling Text and Picture on an LED Neo Pixel / Neo Matrix Display

Scroll picture and text (random colors) using LED pixels (Neomatrix).
joytothe world.png

This is an instruction of how to build a scrolling text and picture using a pair of LED 8x32 pixels (combined to 8x64).

In this Instructible, prior knowledge of microcontroller and Arduino IDE are assumed.


Noteworthy Features:

1. Scrolling text with randomly generated colors.

2. Scrolling image.

3. Over-the-Air (OTA) firmware updates, allowing for convenient wireless updates, especially handy during the winter in Minnesota.

Supplies

nodemcu.png
neomatrix.png
  1. Two LED pixel panels, 8x32 . They will be daisy-chained into 8x64
  2. An ESP32 microcontroller, such as Wemos, ESP8266, in this example I use ESP8266 NodeMCU
  3. Any power supply from 5V to 12V. Any USB phone charger will work, or repurpose any DC power supply.

Wiring

wiring.png

The wiring is simple as shown on the picture. The LED pixels are daisy-chained to form 8x64

Picture Conversion

nativity1.png
resize.png
pixel-excel.png
vbcode.png
immediate.png

In this example, a nativity picture is used. Here are the steps:

  1. Create a new folder
  2. Download my Python codes from this link.
  3. Place a picture file into this folder, use or convert to a PNG file and rename it to "picture-original.png"
  4. Run the Python code of "black-background.py"
  5. The code replaces any white background to black. The reason is because having white lights will overwhelm the rest of the pixels, essentially too bright.
  6. The new file is "picture-black-background.png"
  7. Use any picture app, in my case I use Paint 3D:
  8. Open the "picture-black-background.png" file
  9. Resize the width to 64 pixels as shown on the 2nd picture in this section to follow the LED pixel width.
  10. Save the file as "picture-pixel-adjust.png"
  11. Run the Python code of "pixel-to-excel.py":
  12. This code convert the "picture-pixel-adjust.png" file into "pixel-to-excel.xlsx" file
  13. Open the Excel file (shown in the 3rd picture). Resize the cells for convinient of viewing the entire picture in the Excel cells.
  14. Open the "Scroll Pixel Generator.xlsm" file:
  15. Copy the previous Excel picture cells into this file.
  16. Open the Excel Visual Basic. Replace the nrow line to the picture number of rows (45 in this example).
  17. Open the Visual Basic Immediate Window or press Control+G.
  18. Run the Visual Basic code shown in the 4th picture, the ouput will show up in the Immediate Window, like what is shown in the 5th picture.

Firmware ESP32 Upload

arduinobipmap.png
scrolltext.png
  1. Download my GitHub codes from this link.
  2. Open the files using the Arduino IDE. You can install the IDE from this link. Some prior knowledge of Arduino IDE is assumed.
  3. From the Step 2, copy the text content of the Immediate window:
  4. Paste the file into the Arduino IDE "bitmap" file (see the 1st picture).
  5. To edit the scroll text, modify the lines shown in the 2nd picture. You can add more lines if desired:
  6. The code changes the scroll text colors randomly for aesthetic purpose only.

Wireless Firmware Update or OTA (over the Air)

  1. After uploading the firmware from the previous step, uplug the microcontroller.
  2. Close the Arduino IDE
  3. Use a power supply, 5V to 12V to power the VIN and GND of the microcontroller pins.
  4. Reopen the Arduiono IDE.
  5. The code was set to allow OTA (Over the Air) firmware upload:
  6. Tools -> Port
  7. Select "OTA-FRONT-NEOMATRIX", that is the wireless name.
  8. Set the upload speed not higher than 115200 baud rate.
  9. Upload the code to verify.

Enjoy