4-module MAX7219 LED matrix as a lightsaber for lego darth vader. It can show pomodoro timer, lightsaber or clock(todo).
yt video: https://www.youtube.com/watch?v=gJfaWJKogRg
Key Features:
- Pomodoro Timer: A timer set to 50-minute work sessions and 10-minute break sessions. You can change it in code.
- Lightsaber Mode: An LED matrix animation, random intensity changes to the LEDs
- Clock Mode: A placeholder state for future development, when I will get ds3231 clock module
To build this project, you need the following components:
- 1x Arduino board (in my case - Arduino Pro Micro)
- 1x MAX7219 8x8 LED Matrix module (4-in-1, FC16_HW hardware type)
- Jumper wires
- ds3231 clock module (todo)
Wiring Diagram
The MD_MAX72XX library uses Hardware SPI by default. The CS (Chip Select) pin is defined as 10 in the code.
| MAX7219 Pin | Arduino Pin |
|---|---|
| VCC | 5V |
| GND | GND |
| DIN | Pin 11 (MOSI) |
| CS | Pin 10 |
| CLK | Pin 13 (SCK) |
This project is developed using the Arduino IDE.
You need to install the following library:
- MD_MAX72XX (Handles the matrix drawing and hardware interface)
- Open the
.inofile in the Arduino IDE. - Ensure the
MD_MAX72XXlibrary is installed. - Choose the operating mode by modifying the
actualStatevariable at the top of the code:
const States actualState = POMODORO; (Available states: POMODORO, CLOCK, LIGHTSABER)
- If necessary, adjust the LED brightness by changing the value of
#define LED_INTENSITY 4. - Upload the code to your Arduino board.
for making led matrix:
for DS3231 clock module



