-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLedCube.ino
More file actions
80 lines (66 loc) · 1.45 KB
/
LedCube.ino
File metadata and controls
80 lines (66 loc) · 1.45 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**************************************************************
Name : CapellaCube
By : Gabriel Capella
Controle um cubo 8x8x8
Date : 27 July, 2015
Version : 0.1
Notes : Using a 8x74HC595
****************************************************************/
#include <TimerOne.h>
#define AXIS_X 1
#define AXIS_Y 2
#define AXIS_Z 3
#define CUBE_SIZE 8
#include <math.h>
#include <stdint.h>
//Pin connected to ST_CP of 74HC595
int latchPin = 10;
//Pin connected to SH_CP of 74HC595
int clockPin = 13;
////Pin connected to DS of 74HC595
int dataPin = 11;
byte data[8][8];
int vidas = 0;
void setup() {
Serial.begin(9600);
Initilize();
Serial.println(1);//TODO remover
//Teste de efeitos
/*
effect_random_filler(75,1);
effect_random_filler(75,0);
fill(0x00);
effect_rain(100);
fill(0x00);
effect_stringfly2("Capella");
fill(0x00);
effect_loadbar(100);
fill(0x00);
effect_box_shrink_grow(3,1,1,1000);
fill(0x00);
boingboing(1000,150, 1, 2);
fill(0x00);
*/
sendplane_rand_z (0, 1000, 10000);
fill(0x00);
effect_stringfly2("Harduime");
}
void loop()
{
vidas++;
fill(0x00);
delay(500);
effect_random(50, 450);
gol_play(1000);
delay(1000);
effect_planboing(3, 700);
effect_planboing(2, 700);
fill(0x00);
String v = String(vidas);
char vi[6];
v.toCharArray(vi, 6);
effect_stringfly2(vi);
effect_planboing(1, 700);
effect_planboing(3, 700);
delay(1000);
}