Introduction: Scrolling Text and Picture on an LED Neo Pixel / Neo Matrix Display
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
- Two LED pixel panels, 8x32 . They will be daisy-chained into 8x64
- An ESP32 microcontroller, such as Wemos, ESP8266, in this example I use ESP8266 NodeMCU
- Any power supply from 5V to 12V. Any USB phone charger will work, or repurpose any DC power supply.
Step 1: Wiring
The wiring is simple as shown on the picture. The LED pixels are daisy-chained to form 8x64
Step 2: Picture Conversion
In this example, a nativity picture is used. Here are the steps:
- Create a new folder
- Download my Python codes from this link.
- Place a picture file into this folder, use or convert to a PNG file and rename it to "picture-original.png"
- Run the Python code of "black-background.py"
- 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.
- The new file is "picture-black-background.png"
- Use any picture app, in my case I use Paint 3D:
- Open the "picture-black-background.png" file
- Resize the width to 64 pixels as shown on the 2nd picture in this section to follow the LED pixel width.
- Save the file as "picture-pixel-adjust.png"
- Run the Python code of "pixel-to-excel.py":
- This code convert the "picture-pixel-adjust.png" file into "pixel-to-excel.xlsx" file
- Open the Excel file (shown in the 3rd picture). Resize the cells for convinient of viewing the entire picture in the Excel cells.
- Open the "Scroll Pixel Generator.xlsm" file:
- Copy the previous Excel picture cells into this file.
- Open the Excel Visual Basic. Replace the nrow line to the picture number of rows (45 in this example).
- Open the Visual Basic Immediate Window or press Control+G.
- 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.
Step 3: Firmware ESP32 Upload
- Download my GitHub codes from this link.
- Open the files using the Arduino IDE. You can install the IDE from this link. Some prior knowledge of Arduino IDE is assumed.
- From the Step 2, copy the text content of the Immediate window:
- Paste the file into the Arduino IDE "bitmap" file (see the 1st picture).
- To edit the scroll text, modify the lines shown in the 2nd picture. You can add more lines if desired:
- The code changes the scroll text colors randomly for aesthetic purpose only.
Step 4: Wireless Firmware Update or OTA (over the Air)
- After uploading the firmware from the previous step, uplug the microcontroller.
- Close the Arduino IDE
- Use a power supply, 5V to 12V to power the VIN and GND of the microcontroller pins.
- Reopen the Arduiono IDE.
- The code was set to allow OTA (Over the Air) firmware upload:
- Tools -> Port
- Select "OTA-FRONT-NEOMATRIX", that is the wireless name.
- Set the upload speed not higher than 115200 baud rate.
- Upload the code to verify.
Enjoy