-
Notifications
You must be signed in to change notification settings - Fork 0
/
LED_serial.h
39 lines (30 loc) · 1005 Bytes
/
LED_serial.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
//#include "WProgram.h"
#ifndef LED_serial_h
#define LED_serial_h
#include "memory_color.h"
//Here we define which pins we are using
#define clockpin 13 // CI
#define enablepin 10 // EI
#define latchpin 9 // LI
#define datapin 11 // DI
//This is the number of LEDs (or brollies)
#define NumLEDs 48
//Here are the variables and array the basic LED system needs externed
extern int LEDChannels[][3];
extern int SB_CommandMode;
extern int SB_RedCommand;
extern int SB_GreenCommand;
extern int SB_BlueCommand;
//I think this is from a previous debugging set
//extern int LEDOn;
//Here are the basic fucntions for pushing the LED to the serial bus.
void SB_SendPacket();
void WriteLEDArray();
//These allow access to the color array from the higher level objects
void setArrayColor(int red,int green, int blue, int brolly);
Color getArrayColor(int brolly);
//This sets up the LED pins and stuff.
void LEDSetup();
//Here we compress the numbers in the array to the serial bus
int serReadInt();
#endif