-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfig_TPM.h
261 lines (175 loc) · 8.17 KB
/
config_TPM.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
258
259
260
261
#ifndef _CONFIG_TPM_h
#define _CONFIG_TPM_h
//#define HUZZAH32_BOARD
//#define OMILEX32_POE_BOARD
//#include "arduino.h"
// This is the Config file for the TinyPixxelMapper
// It should only hold #defines for compile time replacment
// settings where the name starts with DEF will only be loaded if there are no setting on the SPIFFS
//#define ARTNET_DISABLED // disables artnet, wont be compiled
//#define OSC_MC_SERVER_DISABLED
#define OVERWRITE_INIT_CONF_ON false
//Overwrite, wifi, device and led settings to defaut
// DEFAULT settings if not loaded from the SPIFFS
// General booleans
#define DEF_DEBUG_OUT true // serial debugging
#define DEF_DEBUG_TELNET true // debug to TELNET?
#define DEF_OTA_SERVER true // enable the OTA server ?
#define DEF_HTTP_ENABLED true // enable the HTTP server ?
#define WRITE_CONF_AT_INIT true // write bools/wifi def conf to SPIFFS on load if not available.
// Wifi
#define DEF_WIFI_POWER true // Enable wifi holing button on boot overides this and unit goes into AP mode with DEF_AP_PASSWD as the AP password
#define DEF_WIFI_MODE true // false = client , true = AP
#define DEF_WIFI_EVENTS false // Show wifievents in Console
#define DEF_AP_NAME "TinyPixelMapperPRL7" // AP and Hostname
#define DEF_SSID "home" // SSID to connect to
#define DEF_WIFI_PWD "love4all" // PW for wifi Client
#define DEF_AP_PASSWD "love4all" // PW for AP mode !!! no OSC config yet STATIC !!!!
#define DEF_STATIC_IP_ENABLED false // set static ip for startup ?
#define DEF_IP_LOCAL {172,16,222,27} // Static IP
#define DEF_IP_SUBNET {255,255,255,0} // Subnet Mask
#define DEF_IP_DGW {172,16,222,1} // DGW
#define DEF_WIFI_CHANNEL 1 // the wifi channel 1-12
#define DEF_DNS {172,16,222,1} // DNS server
#define DEF_NTP_SERVER "0.at.pool.ntp.org" //"0.at.pool.ntp.org" // only FQDN's no ip!!
#define DEF_TIMEZONE 2 // how much to add to UTC for the NTP client
#define WIFI_CLIENT_CONNECT_TIMEOUT 1000 // how long to try to connect to the Wifi
#define WIFI_CLIENT_CONNECT_TRYS 1 // how many times to try to connect to the wifi
// Default Artnet
#define DEF_ARTNET_SEND_ENABLE false // enable Artnet ?
#define DEF_ARTNET_RECIVE_ENABLE false // enable Artnet ?
#define DEF_ARTNET_STAT_UNIVERSE 5 // Default Artnet Start universe
#define DEF_ARTNET_NUMBER_OF_UNIVERSES 4 // Default Arnet NR of universes MAX 4 !!!! TODO
#define DEF_ARTNET_MAC { 0x04, 0xE9, 0xE5, 0x00, 0x69, 0xEC } // TODO!!!!! we dont want duplicates!!! so lets generate it!!!
// DEFAULT FFT parameters if not loaded from SPIFFS
#define DEF_FFT_IP_MULTICAST {239, 0, 0, 57} // Multicast IP address to send the FFT data to
#define DEF_FFT_SLAVE_PORT 431 // Multicast DEST port for FFT packets
#define DEF_FFT_MASTER_PORT 432 // Multicast source port to send from
#define DEF_FFT_ENABLE false // enalbe FFT from start?
#define DEF_FFT_MASTER false // set the node to Master mode?
#define DEF_AUTO_FFT true // enalbe auto FFT ?
#define DEF_FFT_MASTER_SEND false // if in master mode send out the UDP Multicast packets?
// END WIFI
// FastLed Defines
//#define FASTLED_ESP8266_RAW_PIN_ORDER // Set Raw pin order not NodeMCU fake pins!!!
/* DEF_LED_MODE:
This select the way the controller outputs are setup!
in Line mode they are serial. So set the Nr of leds correctly and the correct starled for that output.
in Mirror mode all start al led 0 and do the same.
This is loaded at boot!
Type : Mode : led_type
0: Mirror : MIX : Data1 + CLk 1 = APA102 ; Data3 = WS2812 ; Data4 = SK8622
5: Line : MIX : Data1 + CLk 1 = APA102 ; Data3 = WS2812 ; Data4 = SK8622
1: Line : APA102 : Data1+CLK & Data3+Data4(clk) = APA102
2: Mirror : APA102 : Data1+CLK & Data3+Data4(clk) = APA102
3: Line : WS2812b : Data1 to Data4 = WS2812b
4: Mirror : WS2812b : Data1 to Data4 = WS2812b
*/
#define DEF_LED_MODE 4
#define NUM_LEDS 352 //w170*4 // NR of leds for mirror mode.
#define DEF_DATA1_START_NR 0
#define DEF_DATA1_NR_LEDS 340 //170*4
#define DEF_DATA2_START_NR 0
#define DEF_DATA2_NR_LEDS 10 //170*4
#define DEF_DATA3_START_NR 50
#define DEF_DATA3_NR_LEDS 340 //170*4
#define DEF_DATA4_START_NR 0
#define DEF_DATA4_NR_LEDS 340 //170*4
#define DEF_DATA1_ENABLE true
#define DEF_DATA2_ENABLE false
#define DEF_DATA3_ENABLE true
#define DEF_DATA4_ENABLE false
#define DEF_PLAY_MODE 0
#define DEF_FIRE_SPARKING 50
#define DEF_FIRE_COOLING 30
#define FIRE_COOLING_MAX 100
#define FIRE_COOLING_MIN 20
#define FIRE_SPARKING_MIN 50
#define FIRE_SPARKING_MAX 200
#ifdef HUZZAH32_BOARD
#define LED_DATA_PIN 18 // DATA 1 PIN
#define LED_CLK_PIN 5 // DATA 2 PIN / data1CLK pin
#define LED_DATA_3_PIN 19 // DATA 3 PIN = WS2812
#define LED_DATA_4_PIN 17 // DATA 4 PIN = SK6822
// Variable resistors + Buttons
#define POTI_BRI_PIN 39 // For Brightness
#define POTI_FPS_PIN 36 // for speed
#define BTN_PIN 4 // for a button
// MSGEQ7 Pins
#define MSGEQ7_INPUT_PIN 34 // input from mic
#define MSGEQ7_STROBE_PIN 21 // stobe pin
#define MSGEQ7_RESET_PIN 26 // reset pin
#endif
#ifdef OMILEX32_POE_BOARD
#define USE_SD
#define USE_ETHERNET
#define LED_DATA_PIN 13 // DATA 1 PIN
#define LED_CLK_PIN 5 // DATA 2 PIN / data1CLK pin
#define LED_DATA_3_PIN 4 // DATA 3 PIN = WS2812
#define LED_DATA_4_PIN 3 // DATA 4 PIN = SK6822
#define POTI_BRI_PIN 39 // For Brightness orig 13
#define POTI_FPS_PIN 36 // for speed
#define BTN_PIN 34 // for a button on omilex
// MSGEQ7 Pins
#define MSGEQ7_INPUT_PIN 35 // input from mic
#define MSGEQ7_STROBE_PIN 32 // stobe pin
#define MSGEQ7_RESET_PIN 33 // reset pin
#endif
#ifdef OMILEX32_GW_BOARD
#define USE_SD
#define USE_ETHERNET
#define ARDUINO_ESP32_GATEWAY G // define pin layout G
#define LED_DATA_PIN 32 // DATA 1 PIN
#define LED_CLK_PIN 13 //NOK // DATA 2 PIN / data1CLK pin
#define LED_DATA_3_PIN 12 // DATA 3 PIN = WS2812
#define LED_DATA_4_PIN 16 //NOK // DATA 4 PIN = SK6822
#define POTI_BRI_PIN 35 // // For Brightness orig 13
#define POTI_FPS_PIN 4 // // for speed 4 NOK
#define BTN_PIN 34 // // for a button on omilex
// MSGEQ7 Pins
#define MSGEQ7_INPUT_PIN 33 // input from mic
#define MSGEQ7_STROBE_PIN 39 // stobe pin
#define MSGEQ7_RESET_PIN 36 // reset pin
#endif
#define DEF_APA102_DATARATE 4
#define DEF_MAX_BRI 255 // the default max bri
#define DEF_BRI 240 // the deault Bri
// FFT
#define FFT_MIN_AUTO_TRIGGER 11 // Deafult min auto FFT trigger
#define FFT_MAX_AUTO_TRIGGER 222 // Default Max auto FFT trigger
//#define FASTLED_ALLOW_INTERRUPTS 0
//#define FASTLED_INTERRUPT_RETRY_COUNT 0 // dont retry to send interupted transmissions to leds
#define DEF_VIZ_UPDATE_TIME_FPS 3
// END FastLed Defines
#define BUTTON_DOWN false
#define DEF_DISABLE_HW_POTS false
// OSC Defines
#define OSC_IPMULTI_ {239,0,0,58} // the multicast IP we sent to to brodcast the FFT data
#define OSC_PORT_MULTI_ 420 // the multicast port to send to
#define OSC_OUTPORT 9000 // the OSC port we sent to on responsed
#define OSC_INPORT 8000 // The input osc port
// END OSC
/*
MSGEQ7
--------\_/-------
3v && GND-0 .1uF- |1-VDDA CKIN-8| -- 200k - VVC && -- 33pF - GND
GND |2-VSSA RESET-7| - Reset PIN (17)
to A4 |3-OUT CG -6| - 0.01uF - GND
Strobe pin (19) |4-STROBE IN-5| - 0.01uF -22k - Mic (??33pF to input
------------------
ADAfruit MAX9814
-|GND
-|V+
-|Gain
-|out
-|AR
for a gain between :
20db to 40 db, connect the gain pin to the VDD
30db to 50 db, connect the gain pin to the GND
40db to 60 db, leave the gain pin unconnected
for a A/R of :
1:500 ms/ms, connect the AR pin to the GND
1:2000 ms/ms, connect the AR pin to the VDD
1:4000 ms/ms, leave the AR pin unconnected
*/
#endif