If your microcontroller has anought I/O pins and dedicated DMA hardware you may want to consider more optimized libraries such as the ESP32 I2S library by mrfaptastic. It does not require DMA capabilities and works with ESP8266, ESP32 and Atmel-based Arduinos (only up to 64x32).
The driver is Adafruit GFX compatible and is optimized for low pin count.
Multiple panels may be chained together to build larger displays. These panels are commonly used in large-scale LED displays and come in different layouts and resolutions: Pitch (mm) This driver controls Chinese RGB LED Matrix modules without any additional components whatsoever. NTP.PxMatrix - LED matrix panel driver for ESP8266, ESP32 and ATMEL WiFi.begin(YOUR_WIFI_SSID, YOUR_WIFI_PASSWD) NTPSyncEvent_t ntpEvent // Last triggered event Int feeds_number = sizeof(feeds) / 4 // unsigned long is 32-bit = 4-byteīoolean syncEventTriggered = false // True if a time event has been triggered Unsigned long send_text_interval = 8000 // in msec Unsigned long send_time_interval = 10000 // in msec
Sends instructions to Arduino NANO over SERIAL NODEMCU V1 (Arduino IDE) for Clock IoT LED Matrix project NTPclient library: Copyright 2016 German Martin All rights reserved.
I soldered 15-pin female headers on a perf board, for the Arduino Nano and the NodeMCU, and a few wires for power and the Serial connection, and the ribbon cable to the display: 8 data pins plus GND.Īs the box seemed to have trouble sometimes connecting to my home Wifi network (about 10m away, 1 floor up), resulting in a 00:00 time display and no data feed, i added a large capacitor (3300uF) on the power rail and that seems to fix it. I assume it would work by putting a PWM signal on the matrix power wires, with a MOSFET on an Arduino pin but i did not test that. The matrix is a bit too bright, so i tried using PWM on the OE pin (output enable) by modifying the library, but that did not seem to make a difference. I tested this with my USB power monitor, and the entire project only draws up to 500mA, no problem at all for my USB phone charger. The LED matrix came with 2 thick power supply wires, which made me a bit worried about current needed. Outside temperature, in degrees Celsius, with no decimals, to fit 4 digits.This is done on the ESP8266 so the Arduino just has to display the String it receives. As i only have 4 digits, i have to format the data, e.g. Total energy consumption of our house, in Watts.The top line of the display is reserved for the time, and on the second line i alternate a few data feeds: This system has been running for over 3 years, collecting electricity consumption (6 phases) and temperature, humidity, wind data, with solar powered nodes. I have a home monitoring system based on the OpenEnergyMonitor platform, and its excellent cloud server. I wanted to sync this clock over the internet, so i realised i could add some more data feeds to the display, and i got plenty to choose from (see above). My initial idea was to build just a clock to hang in our living room, to make sure the kids leave on time in the morning to catch their ferry to school. Network Time Servers make the time available online, so a piece of cake for the ESP8266 Wifi module to sync the time, with this NTPclient library (Arduino IDE). The ESP8266 sends simple Strings at 9600 baud, in the format “T1448*” for time 14:48 and “S1k2W*” for 1k2W as in the above picture.
The Arduino and NodeMCU share the 5V power supply (5V on the Arduino, Vin on the NodeMCU), and their only connection is the Serial TX pin on the NodeMCU to the Serial RX pin (D0) on the Arduino, with a 220Ω resistor in between so the ESP8266 TX pin does not get the full 5V of the RX on the Arduino.
I did try to drive the matrix directly from an ESP8266 (NodeMCUv1, via Arduino IDE) but i could not get that to work (timing problem) so i decided to stick with the Arduino Nano for the matrix driver, and the ESP8266 for fetching the data and pushing them over a Serial connection to the Arduino. I found a good 8×8 font bitmap here and added it to my code. As the library only allows writing a character to each tile of 8×8 LEDs, i only got 2 rows of 4 characters. Easy to make it work with an Arduino, but no fonts included in the library, only digits. I got this (monochrome) LED matrix a few years ago from Seeedstudio (now only available in RGB) it is based on 74HC595 and 74HC138 chips to do the multiplexing, and came with this basic library. I put it in a laser cut wooden box, and powered it from a USB phone charger. It uses a 32×16 LED matrix driven by an Arduino Nano, and ESP8266 Wifi module (NodeMCU v1). This box shows the time (NTP sync) and a few data feeds of my home monitoring system.