forked from scottbez1/smartknob
-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio.ini
296 lines (260 loc) · 8.16 KB
/
platformio.ini
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = view
src_dir = firmware/src
lib_dir = firmware/lib
include_dir = firmware/include
test_dir = firmware/test
data_dir = firmware/data
[base_config]
platform = [email protected]
framework = arduino
monitor_speed = 921600
monitor_flags =
--eol=CRLF
--echo
--filter=esp32_exception_decoder
upload_speed = 921600
lib_deps =
infineon/TLV493D-Magnetic-Sensor @ 1.0.3
bxparks/AceButton @ 1.9.1
bakercp/PacketSerial @ 1.4.0
nanopb/Nanopb @ 0.4.7 ; Ideally this would reference the nanopb submodule, but that would require
; everyone to check out submodules to just compile, so we use the library
; registry for the runtime. The submodule is available for manually updating
; the pre-compiled (checked in) .pb.h/c files when proto files change, but is
; otherwise not used during application firmware compilation.
build_flags =
-DMONITOR_SPEED=921600
[env:view]
extends = base_config
board = esp32doit-devkit-v1
board_build.partitions = default_ffat.csv
lib_deps =
${base_config.lib_deps}
askuric/Simple FOC @ 2.2.0
bodmer/[email protected]
fastled/FastLED @ 3.5.0
bogde/HX711 @ 0.7.5
adafruit/Adafruit VEML7700 Library @ 1.1.1
build_flags =
${base_config.build_flags}
; Display enabled: 1=enable, 0=disable
-DSK_DISPLAY=1
; Display orientation: 0=usb bottom, 2=usb top
-DSK_DISPLAY_ROTATION=0
; LEDs enabled: 1=enable, 0=disable
-DSK_LEDS=1
; Number of LEDs
-DNUM_LEDS=8
; Strain-gauge press input enabled: 1=enable, 0=disable
-DSK_STRAIN=1
; Ambient light sensor (VEML7700) enabled: 1=enable (display/LEDs match ambient brightness), 0=disable (100% brightness all the time)
-DSK_ALS=1
; Use MT6701 magnetic encoder
-DSENSOR_MT6701=1
; Invert direction of angle sensor (motor direction is detected relative to angle sensor as part of the calibration procedure)
-DSK_INVERT_ROTATION=1
-DMOTOR_WANZHIDA_ONCE_TOP=1
; Pin configurations
-DPIN_UH=26
-DPIN_UL=25
-DPIN_VH=27
-DPIN_VL=32
-DPIN_WH=12
-DPIN_WL=33
-DPIN_BUTTON_NEXT=-1
-DPIN_BUTTON_PREV=-1
-DPIN_SDA=15
-DPIN_SCL=8
-DPIN_MT_DATA=37
-DPIN_MT_CLOCK=13
-DPIN_MT_CSN=14
-DPIN_LED_DATA=7
-DPIN_LCD_BACKLIGHT=19
-DPIN_STRAIN_DO=38
-DPIN_STRAIN_SCK=2
-DDESCRIPTION_FONT=Roboto_Thin_24
-DDESCRIPTION_Y_OFFSET=20
-DVALUE_OFFSET=30
-DDRAW_ARC=0
-DSK_BACKLIGHT_BIT_DEPTH=16
; TFT_eSPI setup
-DUSER_SETUP_LOADED=1
-DGC9A01_DRIVER=1
-DCGRAM_OFFSET=1
-DTFT_WIDTH=240
-DTFT_HEIGHT=240
-DTFT_MISO=-1
-DTFT_MOSI=5
-DTFT_SCLK=20
-DTFT_CS=21
-DTFT_DC=22
-DTFT_RST=4
-DTFT_BL=-1
-DLOAD_GLCD=1
-DLOAD_GFXFF=1
-DSPI_FREQUENCY=40000000
; Reduce loop task stack size (only works on newer IDF Arduino core)
; -DARDUINO_LOOP_STACK_SIZE=2048
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
; FastLED setup
; Modify the default unusable pin mask to allow GPIO 7 (allowed to use on ESP32-PICO-V3-02)
; Unusable bits: 6, 8, 9, 10, 20
; (0ULL | _FL_BIT(6) | _FL_BIT(8) | _FL_BIT(9) | _FL_BIT(10) | _FL_BIT(20))
-DFASTLED_UNUSABLE_PIN_MASK=0x100740LL
; 0~39 except from 24, 28~31 are valid
; (0xFFFFFFFFFFULL & ~(0ULL | _FL_BIT(24) | _FL_BIT(28) | _FL_BIT(29) | _FL_BIT(30) | _FL_BIT(31)))
-DSOC_GPIO_VALID_GPIO_MASK=0xFF0EFFFFFF
; GPIO >= 34 are input only
; (SOC_GPIO_VALID_GPIO_MASK & ~(0ULL | _FL_BIT(34) | _FL_BIT(35) | _FL_BIT(36) | _FL_BIT(37) | _FL_BIT(38) | _FL_BIT(39)))
-DSOC_GPIO_VALID_OUTPUT_GPIO_MASK=0x30EFFFFFF
[env:nanofoc]
extends = base_config
platform = [email protected]
board = adafruit_feather_esp32s3
board_build.partitions = firmware/partitions-4MB-fat.csv
lib_deps =
${base_config.lib_deps}
askuric/Simple [email protected]
bodmer/[email protected]
build_flags =
${base_config.build_flags}
; Display enabled: 1=enable, 0=disable
-DSK_DISPLAY=0
; Display orientation: 0=usb bottom, 2=usb top
-DSK_DISPLAY_ROTATION=0
; LEDs enabled: 1=enable, 0=disable
-DSK_LEDS=0
; Number of LEDs
-DNUM_LEDS=8
; Strain-gauge press input enabled: 1=enable, 0=disable
-DSK_STRAIN=0
; Ambient light sensor (VEML7700) enabled: 1=enable (display/LEDs match ambient brightness), 0=disable (100% brightness all the time)
-DSK_ALS=0
-DSENSOR_MAQ430=1
-DPIN_MAQ_SCK=6
-DPIN_MAQ_MISO=7
-DPIN_MAQ_MOSI=5
-DPIN_MAQ_SS=4
; Invert direction of angle sensor (motor direction is detected relative to angle sensor as part of the calibration procedure)
-DSK_INVERT_ROTATION=1
-DMOTOR_MAD2804=1
; Pin configurations
-DPIN_UH=21
-DPIN_UL=12
-DPIN_VH=14
-DPIN_VL=10
-DPIN_WH=13
-DPIN_WL=11
-DPIN_BUTTON_NEXT=-1
-DPIN_BUTTON_PREV=-1
-DPIN_LED_DATA=7
-DPIN_LCD_BACKLIGHT=08
-DPIO_FRAMEWORK_ARDUINO_ENABLE_CDC=1
-DUSBCON=1
-DARDUINO_USB_CDC_ON_BOOT=1
-DARDUINO_USB_MODE=1
-DCORE_DEBUG_LEVEL=2
-DHSPI_SPEED=100000 ; MA/MAQ Nominal SPI Speed in Mhz (HSPI)
-DVSPI_SPEED=400000 ; TFt Nominal SPI Speed in Mhz (VSPI)
; Reduce loop task stack size (only works on newer IDF Arduino core)
; -DARDUINO_LOOP_STACK_SIZE=2048
[env:brushknight_esp32s3]
extends = base_config
platform = [email protected]
board = esp32-s3-devkitc-1
board_build.partitions = default_ffat.csv
monitor_speed = 115200
lib_deps =
${base_config.lib_deps}
bodmer/[email protected]
fastled/FastLED @ 3.5.0
bogde/HX711 @ 0.7.5
adafruit/Adafruit VEML7700 Library @ 1.1.1
askuric/Simple [email protected]
build_flags =
${base_config.build_flags}
; Use physical UART for the serial stream rather than the S3 default USB CDC
-DSK_FORCE_UART_STREAM=1
-DMONITOR_SPEED=115200
; Display enabled: 1=enable, 0=disable
-DSK_DISPLAY=1
; PWM bit resolution (even esp32s3 claims that there are 13 bits, max is 12, after it panics)
-DSK_BACKLIGHT_BIT_DEPTH=12
; Display orientation: 0=usb bottom, 2=usb top
-DSK_DISPLAY_ROTATION=0
; LEDs enabled: 1=enable, 0=disable
-DSK_LEDS=1
; Number of LEDs
-DNUM_LEDS=8
; Strain-gauge press input enabled: 1=enable, 0=disable
-DSK_STRAIN=1
; Ambient light sensor (VEML7700) enabled: 1=enable (display/LEDs match ambient brightness), 0=disable (100% brightness all the time)
-DSK_ALS=0
; Use MT6701 magnetic encoder
-DSENSOR_MT6701=1
; Invert direction of angle sensor (motor direction is detected relative to angle sensor as part of the calibration procedure)
-DSK_INVERT_ROTATION=1
-DMOTOR_WANZHIDA_ONCE_TOP=1
; Pin configurations
; Motor
-DPIN_UH=20
-DPIN_UL=19
-DPIN_VH=21
-DPIN_VL=17
-DPIN_WH=12
-DPIN_WL=18
-DPIN_BUTTON_NEXT=-1
-DPIN_BUTTON_PREV=-1
-DPIN_LED_DATA=7
-DPIN_LCD_BACKLIGHT=5
-DPIN_SDA=15
-DPIN_SCL=8
-DPIN_MT_DATA=37
-DPIN_MT_CLOCK=13
-DPIN_MT_CSN=14
-DPIN_STRAIN_DO=38
-DPIN_STRAIN_SCK=1
-DDESCRIPTION_FONT=Roboto_Thin_24
-DDESCRIPTION_Y_OFFSET=20
-DVALUE_OFFSET=30
-DDRAW_ARC=0
; TFT_eSPI setup
-DUSER_SETUP_LOADED=1
-DGC9A01_DRIVER=1
-DCGRAM_OFFSET=1
-DTFT_WIDTH=240
-DTFT_HEIGHT=240
-DTFT_MISO=-1 # fake
-DTFT_MOSI=3
-DTFT_SCLK=4
-DTFT_CS=9
-DTFT_DC=2
-DTFT_RST=6
-DTFT_BL=-1
-DLOAD_GLCD=1
-DLOAD_GFXFF=1
-DSPI_FREQUENCY=40000000
; Reduce loop task stack size (only works on newer IDF Arduino core)
; -DARDUINO_LOOP_STACK_SIZE=2048
-DCORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_DEBUG
; FastLED setup
; Modify the default unusable pin mask to allow GPIO 7 (allowed to use on ESP32-PICO-V3-02)
; Unusable bits: 6, 8, 9, 10, 20
; (0ULL | _FL_BIT(6) | _FL_BIT(8) | _FL_BIT(9) | _FL_BIT(10) | _FL_BIT(20))
-DFASTLED_UNUSABLE_PIN_MASK=0x100740LL
; 0~39 except from 24, 28~31 are valid
; (0xFFFFFFFFFFULL & ~(0ULL | _FL_BIT(24) | _FL_BIT(28) | _FL_BIT(29) | _FL_BIT(30) | _FL_BIT(31)))
-DSOC_GPIO_VALID_GPIO_MASK=0xFF0EFFFFFF
; GPIO >= 34 are input only
; (SOC_GPIO_VALID_GPIO_MASK & ~(0ULL | _FL_BIT(34) | _FL_BIT(35) | _FL_BIT(36) | _FL_BIT(37) | _FL_BIT(38) | _FL_BIT(39)))
-DSOC_GPIO_VALID_OUTPUT_GPIO_MASK=0x30EFFFFFF