-
Notifications
You must be signed in to change notification settings - Fork 3
/
example.ino
69 lines (44 loc) · 1.62 KB
/
example.ino
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
56
57
58
59
60
61
62
63
64
65
66
67
68
#include "ledTable.h"
#include "images.h"
#include "yves_image.h"
int k=0;
void setup() {
system_update_cpu_freq(SYS_CPU_160MHZ);
Serial.begin(115200);
delay(100);
Serial.setDebugOutput(true);
calculghosts(bgColor) ;
calculfraise(bgColor);
calculpic(cerise, palec, bgColor, 14, 14,cerisecalc);
calculpic(mario, palm, bgColor, 14, 17,mariocalc);
calculpic(mario, pall, bgColor, 14, 17,luigicalc);
if(initTable(30,20)) //size of your led grid (wide*height)
{
FastLED.setBrightness(32);
fill(bgColor);
FastLED.show();
tableOrientation=DOWN_RIGHT_INV; //used if i want ta change table orientation )
}
}
void loop() {
int offset=-20;;
int YO=0;
if(isTable)
{
k = (k+1) % 300;
fill(bgColor);
displaypic(cerisecalc,k +offset, YO, 14, 14);
displaypic(fraiseCalc, k + offset - 14 , YO + 2, 11, 10);
displaypic(ghostred, k + offset - 30, YO, 14, 14);
displaypic(ghostyellow, k + offset - 46, YO, 14, 14);
displaypic(ghostgreen, k + offset - 62, YO, 14, 14);
displaypic(ghostPurple, k + offset - 78, YO, 14, 14);
displaypic(ghostCyan, k + offset - 94, YO, 14, 14);
displaypic(mariocalc, k + offset-110 , YO, 14, 17);
displaypic(luigicalc, k + offset-127 , YO, 14, 17);
displayBitmap(mickey, k + offset-127-15,YO,30,32);
displayBitmap(champi, k + offset-127-15-17,YO+3,16,16);
FastLED.show();
FastLED.delay((int)(1000 / 100));
}
}