Scrolling Text and Picture on an LED Neo Pixel / Neo Matrix Display
by suriono in Circuits > Arduino
789 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).](/proxy/?url=https://content.instructables.com/F5E/7CY3/LQDSA18L/F5E7CY3LQDSA18L.jpg&filename=Scroll picture and text (random colors) using LED pixels (Neomatrix).)
![joytothe world.png](/proxy/?url=https://content.instructables.com/FZC/FK3N/LQDSA1AF/FZCFK3NLQDSA1AF.png&filename=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](/proxy/?url=https://content.instructables.com/FNS/YLSX/LQDS9WOK/FNSYLSXLQDS9WOK.png&filename=nodemcu.png)
![neomatrix.png](/proxy/?url=https://content.instructables.com/F34/D0YV/LQDS9WON/F34D0YVLQDS9WON.png&filename=neomatrix.png)
- 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.
Wiring
![wiring.png](/proxy/?url=https://content.instructables.com/F5I/GF8Z/LQDS9WQM/F5IGF8ZLQDS9WQM.png&filename=wiring.png)
The wiring is simple as shown on the picture. The LED pixels are daisy-chained to form 8x64
Picture Conversion
![nativity1.png](/proxy/?url=https://content.instructables.com/FOO/ABHJ/LQDS9X98/FOOABHJLQDS9X98.png&filename=nativity1.png)
![resize.png](/proxy/?url=https://content.instructables.com/F85/LB3C/LQDS9XLL/F85LB3CLQDS9XLL.png&filename=resize.png)
![pixel-excel.png](/proxy/?url=https://content.instructables.com/FLE/1NXD/LQDS9XX3/FLE1NXDLQDS9XX3.png&filename=pixel-excel.png)
![vbcode.png](/proxy/?url=https://content.instructables.com/F2E/B3BR/LQDS9YEE/F2EB3BRLQDS9YEE.png&filename=vbcode.png)
![immediate.png](/proxy/?url=https://content.instructables.com/F9R/5OVP/LQDS9YEM/F9R5OVPLQDS9YEM.png&filename=immediate.png)
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.
Firmware ESP32 Upload
![arduinobipmap.png](/proxy/?url=https://content.instructables.com/FBT/8658/LQDS9YR0/FBT8658LQDS9YR0.png&filename=arduinobipmap.png)
![scrolltext.png](/proxy/?url=https://content.instructables.com/F47/F0DO/LQDS9YXF/F47F0DOLQDS9YXF.png&filename=scrolltext.png)
- 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.
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