-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.h
93 lines (69 loc) · 1.64 KB
/
Main.h
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
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
* Main.h
*
* Created on: Nov 27, 2012
* Author: joost
*/
#ifndef MAIN_H_
#define MAIN_H_
#include <Arduino.h>
#include <SoftwareSerial.h>
#include <HardwareSerial.h>
#include "CapacitiveSensor.h"
#include <StandardCplusplus.h>
#include <vector>
#include <list>
class Bullet;
class Node;
class VirtualNode;
class LedNode;
class CapacitiveSensor;
class Colour;
namespace Main {
typedef enum Direction {
LEFT, RIGHT
} Direction;
typedef enum Pins {
SoftRX = 2, SoftTX = 3,
TouchOut = 6, TouchIn = 7,
LedData = 4, LedClock = 5,
} Pins;
extern void begin();
extern void ping();
extern void smallPing();
extern void bigPing();
extern void giantPing();
extern void addBullet(Bullet*);
extern void removeBullet(Bullet*);
static void log();
static int freeRam();
extern void send(std::vector<char>, Direction);
extern void broadcast(std::vector<char>);
extern void slowShiftOut(uint8_t);
extern void writeByte(uint8_t);
extern void writeGuard();
extern void writeFrame(LedNode*);
extern void writeFrame();
extern void pushStrip();
extern void pingStrip();
extern Colour HSVtoColour(float, float, float);
extern std::vector<Bullet*> bullets;
extern std::vector<LedNode*> nodes;
extern uint8_t bigInterval;
extern bool activated;
extern uint8_t leftActivated;
extern uint8_t rightActivated;
extern bool soundActive;
extern Colour soundColour;
extern Colour activatedColour;
extern Colour pathColour;
extern Colour baseColour;
extern Colour debugColour;
extern Colour colours[7];
extern uint16_t id;
extern bool hasLeftNeighbour;
extern bool hasRightNeighbour;
extern uint8_t pulseThreshold;
extern uint8_t slumberThreshold;
}
#endif /* MAIN_H_ */