From 5dbc77844004049a190b9191686f38267ee66c1b Mon Sep 17 00:00:00 2001 From: Joachim Hummel Date: Wed, 7 Feb 2024 13:17:32 +0000 Subject: [PATCH] Edit Readme --- README.md | 5 ++++ animation/animation.h | 56 +++++++++++++++++++++++++++++++++++++++++ animation/animation.ino | 20 +++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 animation/animation.h create mode 100644 animation/animation.ino diff --git a/README.md b/README.md index de9c360..d328c5b 100644 --- a/README.md +++ b/README.md @@ -6,3 +6,8 @@ Repo für den Arduino UNO R4 Wifi + +## Arduino Animation + + + diff --git a/animation/animation.h b/animation/animation.h new file mode 100644 index 0000000..4edefd7 --- /dev/null +++ b/animation/animation.h @@ -0,0 +1,56 @@ +const uint32_t animation[][4] = { + { + 0x800c0060, + 0xf00f006, + 0xc00800, + 66 + }, + { + 0xc0060030, + 0xf80f803, + 0x600c00, + 66 + }, + { + 0x60030018, + 0xfc0fc01, + 0x80300600, + 66 + }, + { + 0x3001800c, + 0xfe0fe00, + 0xc0180300, + 66 + }, + { + 0x1800c006, + 0xff0ff00, + 0x600c0180, + 66 + }, + { + 0xc006003, + 0xff8ff80, + 0x300600c0, + 66 + }, + { + 0x6003001, + 0x8ffcffc0, + 0x18030060, + 66 + }, + { + 0x3001800, + 0xcffeffe0, + 0xc018030, + 66 + }, + { + 0x1800c00, + 0x6ffffff0, + 0x600c018, + 66 + } +}; diff --git a/animation/animation.ino b/animation/animation.ino new file mode 100644 index 0000000..7d966ac --- /dev/null +++ b/animation/animation.ino @@ -0,0 +1,20 @@ +#include "animation.h" //Include animation.h header file + +// Create an instance of the ArduinoLEDMatrix class +ArduinoLEDMatrix matrix; + +void setup() { + Serial.begin(115200); + // you can also load frames at runtime, without stopping the refresh + matrix.loadSequence(animation); + matrix.begin(); + // turn on autoscroll to avoid calling next() to show the next frame; the paramenter is in milliseconds + // matrix.autoscroll(300); + matrix.play(true); +} + +void loop() { + delay(2500); + Serial.println(millis()); +} +