กลับไปหน้ารวมไฟล์
arduino-uno-r4-led-matrix-collection-of-animations-2f0a39-en.md

Dot-Matrix Animation Library: UNO R4 WiFi

The "Scrolling Text" project merely showed how to use text blocks on the UNO R4. The UNO R4 LED Matrix Animations project pushes the hardware further by establishing a robust, multi-frame graphics buffer. Instead of numbers, you become a pixel artist, generating an endless loop of jumping geometric shapes, bouncing balls, and mesmerizing transitions entirely on the microcontroller's tiny silicon real estate.

stock_counter_lcd_setup_1772706693516.png

Frame-by-Frame Hexadecimal Logic

A fluid animation requires mapping multiple frames, much like a flipbook.

  1. A single frame on the 12x8 matrix is defined by three 32-bit hexadecimal unsigned integers.
  2. An animation is an array of these arrays.
  3. The Matrix Engine: Utilizing the UNO R4's native <Arduino_LED_Matrix.h>, you can build an array containing 10 separate frames (e.g., a stick figure raising its arms, throwing a ball, and lowering its arms).
const uint32_t throwingAnimation[][4] = {
  { 0x..., 0x..., 0x..., 100 },  // Frame 1 (100ms delay)
  { 0x..., 0x..., 0x..., 100 },  // Frame 2
};
  1. Notice the 4th element (100). The UNO R4 library actually allows you to embed the millisecond frame-delay directly inside the specific frame's multidimensional array!

Advanced Transition Execution

By looping through an array of 50 frames, the R4 processor seamlessly executes the animation.

  • You can map physical Tactile Buttons or analog sensors to trigger specific animations.
  • Pressing Button 1 triggers the "Pac-Man Eating" animation.
  • A sudden drop in a DHT11 Temperature Sensor mathematically triggers the "Falling Snowflakes" animation array!
  • This transforms the Uno R4 from a simple calculation device into an expressive, emotional robotic feedback tool.

Animation Toolkit

  • Arduino UNO R4 WiFi (or Minima). (Crucial, as previous Uno revisions do not have the native pixel matrix!).
  • Arduino IDE Native LED Matrix Editor Tool (An essential GUI interface inside the IDE that allows you to click squares on a grid and automatically generates the horrific hexadecimal math).
  • Physical Push Buttons to act as scene-switchers.

ข้อมูล Frontmatter ดั้งเดิม

title: "Arduino Uno R4 LED Matrix - collection of animations"
description: "R4 Cinema! Delve deep into the Arduino UNO R4 WiFi's onboard LED matrix by compiling an extensive library of complex, looping 12x8 pixel animations and cinematic transitions."
category: "Screens & Displays"
difficulty: "Intermediate"