-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
55 lines (43 loc) · 1.16 KB
/
main.cpp
File metadata and controls
55 lines (43 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <Arduino.h>
#include <Wire.h>
#include <SPI.h>
#include <FastLED.h>
#include "myWifi.h"
#include "Matrix/Config.h"
#include "Core/Shapes.h"
unsigned long MainMillis = 100; // = 3 seconds
unsigned long requestDueTime;
void setup()
{
Serial.begin(115200);
MatrixConfig::begin();
Wifi::begin();
}
Rectangle r1(5, 5, 4, 4, RED, 0.25, true, CLOCKWISE);
Rectangle r2(5, 5, 12, 4, GREEN, 0.25, true, COUNTERCLOCKWISE);
Rectangle r3(5, 5, 20, 4, BLUE, 0.25, true, CLOCKWISE);
Rectangle r4(5, 5, 28, 4, PURPLE, 0.0, false, CLOCKWISE);
Triangle t1(5, 4, 12, RED, 0.25, true, COUNTERCLOCKWISE);
Triangle t2(5, 12, 12, GREEN, 0.25, true, CLOCKWISE);
Triangle t3(5, 20, 12, BLUE, 0.25, true, CLOCKWISE);
Triangle t4(12, 28, 12, AQUA, 1.0, false, CLOCKWISE);
SinWave sw1(5, 5, 32, 64, 64, 4, PURPLE, true, FORWARD, 0.25);
SinWave sw2(10, 10, 32, 64, 64, 12, AQUA, true, FORWARD, 0.25);
void loop()
{
if (millis() > requestDueTime)
{
dma_display->fillScreen(0);
r1.draw();
r2.draw();
r3.draw();
r4.draw();
t1.draw();
t2.draw();
t3.draw();
t4.draw();
sw1.draw();
sw2.draw();
requestDueTime = millis() + MainMillis;
}
}