Arduino Adafruit NeoMatrix 8x8: Wiring, Code and Simulator
To build this Arduino Adafruit NeoMatrix 8x8 project you need an Arduino Uno and a NeoPixel matrix. Adafruit NeoMatrix treats an 8×8 WS2812 matrix as a tiny graphics screen. Make the 3 connections in the wiring table, upload the Arduino C++ code, and use matrix.print() with setTextColor() to show a letter.
Open this circuit in the free Arduino Uno simulator
Parts list
| Qty | Part | What it does |
|---|---|---|
| 1 | Arduino Uno | the microcontroller board |
| 1 | NeoPixel Matrix | A grid of WS2812 pixels, row by row from the top left. DIN from a pin, VCC to 5V, GND to GND. |
Wiring
| # | From | To |
|---|---|---|
| 1 | Arduino Uno pin 6 | NeoPixel Matrix DIN |
| 2 | Arduino Uno 5V | NeoPixel Matrix VCC |
| 3 | Arduino Uno GND | NeoPixel Matrix GND |
Step by step
- Open the simulator. Open the BitForBytes Embedded Lab in your browser and start from the Arduino Uno. No install or account is needed.
- Add the parts. Add a NeoPixel matrix from the parts palette.
- Wire 1. Connect Arduino Uno pin 6 to NeoPixel Matrix DIN.
- Wire 2. Connect Arduino Uno 5V to NeoPixel Matrix VCC.
- Wire 3. Connect Arduino Uno GND to NeoPixel Matrix GND.
- Paste the Arduino C++ code. Paste the Arduino C++ code below into the code editor.
- Run it. Press Run. Use matrix.print() with setTextColor() to show a letter.
Arduino C++ code
// Adafruit NeoMatrix: an 8x8 WS2812 matrix as a tiny graphics screen (pin 6).
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
Adafruit_NeoMatrix matrix(8, 8, 6, NEO_MATRIX_TOP + NEO_MATRIX_LEFT + NEO_MATRIX_ROWS + NEO_MATRIX_PROGRESSIVE, NEO_GRB + NEO_KHZ800);
void setup() {
matrix.begin();
matrix.setBrightness(255);
matrix.fillScreen(0);
matrix.drawPixel(0, 0, matrix.Color(255, 0, 0));
matrix.drawLine(0, 7, 7, 7, matrix.Color(0, 0, 255));
matrix.show();
}
void loop() {}
What to try
Use matrix.print() with setTextColor() to show a letter.
Frequently asked questions
How do I wire the Adafruit NeoMatrix 8x8 project on an Arduino Uno?
Make 3 connections: Arduino Uno pin 6 to NeoPixel Matrix DIN; Arduino Uno 5V to NeoPixel Matrix VCC; Arduino Uno GND to NeoPixel Matrix GND.
What parts do I need for this Arduino project?
An Arduino Uno and a NeoPixel matrix.
Can I simulate this Arduino project online for free?
Yes. The BitForBytes Embedded Lab runs this exact circuit and Arduino C++ code in your browser for free, with no install and no hardware. The sketch is compiled with the real Arduino toolchain and runs on an emulated ATmega328P.
What does the code do?
Adafruit NeoMatrix treats an 8×8 WS2812 matrix as a tiny graphics screen.
More Arduino Uno projects
- Arduino LED Blink: Wiring, Code and Simulator
- Arduino LDR Light Sensor: Wiring, Code and Simulator
- Arduino NTC Thermistor Thermometer: Wiring, Code and Simulator
- Arduino PWM to Analog RC Filter: Wiring, Code and Simulator
- Arduino Capacitance Meter: Wiring, Code and Simulator
- Arduino DC Motor PWM Speed Control with MOSFET: Wiring, Code and Simulator