1.MAX7219-Blink
This example demonstrates the use of MAX7219 LED outputs as if they were just normal IO pins, using digitalWrite
.
- Boards: 🛈
- AVR, AVR USB, Nano Every, Nano 33 IoT, Nano 33 BLE, UNO R4, Pi Pico, Due, Teensy 3.x, ESP8266, ESP32
Connections
- SS: MAX7219 CS
- MOSI: MAX7219 DIN
- SCK: MAX7219 CLK
Behavior
This sketch will blink the first and the last LEDs once a second, in an alternating pattern.
Written by PieterP, 2020-03-24
https://github.com/tttapa/Arduino-Helpers
MAX7219<1> max7219 {SPI, SS};
const pin_t ledPin1 = max7219.pin(0);
const pin_t ledPin2 = max7219.pin(63);
void setup() {
max7219.begin();
}
void loop() {
delay(500);
delay(500);
}
constexpr PinStatus_t LOW
constexpr PinStatus_t HIGH
constexpr PinMode_t OUTPUT
Dummy header file for Arduino builder.
void digitalWrite(pin_t pin, PinStatus_t val)
An ExtIO version of the Arduino function.