-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathConfig.h
257 lines (195 loc) · 4.83 KB
/
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
/*
* Config.h
*
* Created on: 6 mars 2016
* author: Sebastien CAPOU ([email protected])
* Source : https://github.com/neskweek/LightSaberOS
*/
#if not defined CONFIG_H_
#define CONFIG_H_
/*!!!!!IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT!!!
*
* MPU6050 device ORIENTATION
* Choose which MPU's axis is parallel
* to your blade axis
*************************************/
#define BLADE_X
//#define BLADE_Y
//#define BLADE_Z
/************************************/
/*
* BLADE TYPE
*
* RGB LED OR NEOPIXEL users:
* Comment the following line will
* disable and remove all LEDSTRINGS
* blocks from compile
*************************************/
#define LEDSTRINGS
//#define LUXEON
//#define NEOPIXEL
#if defined NEOPIXEL
// How many leds in one strip?
#define NUMPIXELS 114
// Number of color defined
#define COLORS 14
static const uint8_t rgbFactor = 100;
// For led chips like NEOPIXELs, which have a data line, ground, and power, you just
// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock,
// ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN
#define DATA_PIN 14 //A0
#define STRING1 5
#define STRING2 6
#define STRING3 9
#endif
#if defined LUXEON
/*
* MY_OWN_COLORS
* If you want to manually specify your own colors
*/
#define MY_OWN_COLORS
//#define FIXED_RANGE_COLORS
static const uint8_t rgbFactor = 100;
# if defined MY_OWN_COLORS
/* COLORS
* Number of colors YOU defined in getColor function
*/
#define COLORS 3
#else
/* COLORS
* Number of colors to chose from
* Range : 6<->600
* Default: 48
*/
#define COLORS 48
#endif
#endif
/************************************/ // BLADE TYPE
/* MAX_BRIGHTNESS
*
* Maximum output voltage to apply to LEDS
* Default = 100 (39,2%) Max=255 Min=0(Off)
*
* WARNING ! A too high value may burn
* your leds. Please make your maths !
* BE VERY CAREFULL WITH THIS ONE OR
* YOU'LL BURN YOUR BLADE'S LED
************************************/
#define MAX_BRIGHTNESS 100
/* LIGHT_EFFECTS
*
* Enable / disable all light and
* color effects of the blade
* If you a device with a CPU wich is not
* an Atmega328 : COMMENT THIS
************************************/
#define LIGHT_EFFECTS
#define BLASTER_FLASH_TIME 3
#define CLASH_FLASH_TIME 1
/* WRIST_MOVEMENTS
* If you want to enable/disable
* wrists twists movements
*************************************/
//#define WRIST_MOVEMENTS
/* DEEP_SLEEP
* If you want to enable/disable
* deep sleep capabalities
* If you a device with a CPU wich is not
* an Atmega328 : COMMENT THIS
*************************************/
//#define DEEP_SLEEP
#if defined DEEP_SLEEP
#define SLEEP_TIMER 300000 //5min = 300000 millisecs
#endif
/*
* PINS DEFINITION
*/
#if defined LEDSTRINGS
#define LEDSTRING1 3 //3
#define LEDSTRING2 5 //5
#define LEDSTRING3 6 //6
#define LEDSTRING4 9 //9
#define LEDSTRING5 10 //10
#define LEDSTRING6 11 //11
/*
* FoCSTRING
* Enable/disable management of
* single Flash On Clash ledstring
*************************************/
//#define FoCSTRING 14
#endif
#if defined LUXEON
#define LED_RED 3
#define LED_GREEN 5
#define LED_BLUE 6
#endif
/*
* ACCENT_LED
* Enable/disable management of
* a button accent led
*
* If you define ACCENT_LED beware on which
* kind of pin you defined it :
* D3,D5,D6,D9,D10,D11 are hardware PWM
* others must use software PWM
*
* RGB LEDS user should choose tu plu their
* Accent leds on Hardware PWM pin
*
* LEDSTRINGS users have no choice :
* your forced to use Software Accent LED
*************************************/
#define ACCENT_LED 15 //A1
#if defined ACCENT_LED
/*
* Soft or Had PWM for Accent
*/
#define SOFT_ACCENT
#if not defined SOFT_ACCENT
#define HARD_ACCENT
#endif
#endif //ACCENT_LED
/*
* MULTICOLOR_ACCENT_LED
* Enable/disable management of
* a button accent led
*************************************/
//#define MULTICOLOR_ACCENT_LED
#if defined MULTICOLOR_ACCENT_LED
#define RED_ACCENT_LED 16 //A2
#define GREEN_ACCENT_LED 17 //A3
#define BLUE_ACCENT_LED A7 //.... A7 is input only ...
#endif
#define DFPLAYER_RX 8
#define DFPLAYER_TX 7
//#define SPK1 14 //A0
//#define SPK2 15 //A1
#define SPK1 A6 //A6
#define SPK2 A7 //A7
#define MAIN_BUTTON 12
#define LOCKUP_BUTTON 4
/*
* DEBUG PARAMETERS
*/
/* LS_INFO
* For daily use I recommend you comment LS_INFO
* When you plug your device to USB uncomment LS_INFO !
*/
//#define LS_INFO
#if not defined LS_INFO
//#define LS_DEBUG
#endif
#if defined LS_DEBUG
//#define LS_BUTTON_DEBUG
#define LS_MOTION_DEBUG
#define LS_MOTION_HEAVY_DEBUG
//#define LS_RELAUNCH_DEBUG
//#define LS_DEBUG_SLEEP
#endif
#if defined LS_MOTION_DEBUG
#define LS_SWING_DEBUG
#define LS_SWING_HEAVY_DEBUG
//#define LS_CLASH_DEBUG
//#define LS_CLASH_HEAVY_DEBUG
#endif
#endif /* CONFIG_H_ */