-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice_config.h
113 lines (89 loc) · 3.31 KB
/
device_config.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#ifndef __INC_AA_DEVICE_CONFIG
#define __INC_AA_DEVICE_CONFIG
// Edit these to set your device parameters, then remove the
// "Example configurations" down below.
/* // <- Don't forget to uncomment first
// Configuration template
// --------
// Total # of lights on string
#define LIGHT_COUNT (150)
// Lighted length of the string
#define STRAND_LENGTH (10.0)
// Button input
#define BUTTON_PIN (2)
// Pick an LED output
// --------
// Adafruit DotStar
//#include "outputadafruitdotstar.h"
//extern OutputAdafruitDotStar lights;
//#define DEC_OUTPUT OutputAdafruitDotStar lights(LIGHT_COUNT, DOTSTAR_BGR);
// FastLED DotStar
//#include "outputfastled.h"
//extern OutputFastLED<DOTSTAR, BGR> lights;
//#define DEC_OUTPUT OutputFastLED<DOTSTAR, BGR> lights(LIGHT_COUNT);
// GE G35
//#include "outputg35.h"
//#define G35_PIN (11)
//extern OutputG35 lights;
//#define DEC_OUTPUT OutputG35 lights(LIGHT_COUNT, G35_PIN);
//
// Note: Length is usually 50, 48, or 36. Maximum is 63, because the protocol
// uses 6-bit addressing and bulb #63 is reserved for broadcast messages.
// Pick a status LED output
// --------
// On/off status indicator LED
//#include "statussimpleled.h"
//#define STATUS_LED_PIN (LED_BUILTIN)
//extern StatusSimpleLed statusLed;
//#define DEC_STATUS StatusSimpleLed statusLed(STATUS_LED_PIN);
// DotStar status indicator LED
//#include "statusdotstarled.h"
//#define STATUS_DOTSTAR_DATAPIN (8)
//#define STATUS_DOTSTAR_CLOCKPIN (6)
//extern StatusDotStarLed statusLed;
//#define DEC_STATUS StatusDotStarLed statusLed(STATUS_DOTSTAR_DATAPIN, STATUS_DOTSTAR_CLOCKPIN);
*/
// Example configurations
// (Comment these out or remove this when setting your own)
// /*
// --------
#if defined(ADAFRUIT_ITSYBITSY_M4_EXPRESS)
// ItsyBitsy with 10m of 30 LED/m DotStar LEDs, up to 6 MHz SPI
// (ItsyBitsy supports 12 MHz, but with tested setup it seemed unstable)
// NOTE: the Adafruit_DotStar v1.2.0 release moved to SPI transactions,
// making it impractical to override this. Thankfully the 8 MHz SPI
// default seems to work correctly.
// --------
#define LIGHT_COUNT (300)
#define STRAND_LENGTH (10.0)
#define BUTTON_PIN (2)
// Adafruit DotStar
#include "outputadafruitdotstar.h"
extern OutputAdafruitDotStar lights;
#define DEC_OUTPUT OutputAdafruitDotStar lights(LIGHT_COUNT, DOTSTAR_BGR);
// DotStar status indicator LED
#include "statusdotstarled.h"
// See Adafruit_DotStar/examples/onboard/onboard.ino
#define STATUS_DOTSTAR_DATAPIN (PIN_DOTSTAR_DATA)
#define STATUS_DOTSTAR_CLOCKPIN (PIN_DOTSTAR_CLK)
extern StatusDotStarLed statusLed;
#define DEC_STATUS StatusDotStarLed statusLed(STATUS_DOTSTAR_DATAPIN, STATUS_DOTSTAR_CLOCKPIN, DOTSTAR_BGR);
#elif defined(ARDUINO_AVR_UNO)
// Arduino Uno with 12.4m of GE ColorEffects G-35 LEDs
// --------
#define LIGHT_COUNT (50)
#define STRAND_LENGTH (12.4)
#define BUTTON_PIN (2)
// GE G35
#include "outputg35.h"
#define G35_PIN (11)
extern OutputG35 lights;
#define DEC_OUTPUT OutputG35 lights(LIGHT_COUNT, G35_PIN);
// On/off status indicator LED
#include "statussimpleled.h"
#define STATUS_LED_PIN (LED_BUILTIN)
extern StatusSimpleLed statusLed;
#define DEC_STATUS StatusSimpleLed statusLed(STATUS_LED_PIN);
#endif
// */
#endif