Compare commits

...

2 Commits

Author SHA1 Message Date
Joachim Hummel
98c54799f5 Merge branch 'main' of https://git.unixweb.net/joachim/arduino-uno-r4-wifi into main 2024-02-07 13:18:01 +00:00
Joachim Hummel
5dbc778440 Edit Readme 2024-02-07 13:17:32 +00:00
3 changed files with 81 additions and 0 deletions

View File

@ -6,3 +6,8 @@ Repo für den Arduino UNO R4 Wifi
<img src="https://git.unixweb.net/joachim/arduino-uno-r4-wifi/raw/branch/main/images/Arduino-UNO-R4-Wifi-Uhr.jpg"> <img src="https://git.unixweb.net/joachim/arduino-uno-r4-wifi/raw/branch/main/images/Arduino-UNO-R4-Wifi-Uhr.jpg">
</a> </a>
## Arduino Animation
<img src="https://git.unixweb.net/joachim/arduino-uno-r4-wifi/raw/branch/main/images/Arduino-UNO-R4-Wifi-Pfeil.jpg">
</a>

56
animation/animation.h Normal file
View File

@ -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
}
};

20
animation/animation.ino Normal file
View File

@ -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());
}