-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
platformio.ini
221 lines (201 loc) · 9.13 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
; 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 = wemos_d1_mini32
;default_envs = nodemcu-32s
;default_envs = avaspark-rgb
;default_envs = lolin_wemos_s3_mini
;default_envs = feather_esp32
;default_envs = m5stack-stamps3
[common_env_data]
lib_deps_external =
adafruit/Adafruit NeoPixel @ ^1.11.0
h2zero/NimBLE-Arduino@1.4.1
fabianoriccardi/Melody Player @ ^2.4.0
bblanchon/ArduinoJson @ ^6.21.3
paulo-raca/Buffered Streams @ ^1.0.8
build_flags =
-D CONFIG_BT_NIMBLE_PINNED_TO_CORE=0
-D CONFIG_NIMBLE_STACK_USE_MEM_POOLS=1
-D CONFIG_BT_NIMBLE_ROLE_CENTRAL_DISABLED ; Disable NimBLE Client code, will save ~7kB
-D CONFIG_BT_NIMBLE_ROLE_OBSERVER_DISABLED ; Disable NimBLE Client code, will save ~26kB
-D CORE_DEBUG_LEVEL=0
[ESP32]
build_flags=
${common_env_data.build_flags}
-D PIN_NEOPIXEL=4 ; DIN of WS28xx stripe for front- / backlight, only needed if WS28xx is used
-D MOSFET_PIN_1=22 ; PWM signal for MOSFET 1 (front white, back red), only needed if COB is used
-D MOSFET_PIN_2=23 ; PWM signal for MOSFET 2 (front red, back white), only needed if COB is used
-D PIN_FORWARD=18 ; digital signal from Cheap Focer 2 if direction is forward
-D PIN_BACKWARD=19 ; digital signal from Cheap Focer 2 if direction is backward
-D PIN_BRAKE=21 ; digital signal from Cheap Focer 2 if electric motor brakes is on
-D BUZPIN=25 ; PIN for Piezo buzzer for acoustic signals (e.g. battery warning)
-D BATTERY_PIN=34 ; analog input for battery monitor, connected to voltage divider
-D LIGHT_BAR_PIN=2 ; DIN of WS28xx for battery indicator
-D VESC_RX_PIN=16 ; UART RX to Cheap Focer 2, connent to TX on CF2
-D VESC_TX_PIN=17 ; UART TX to Cheap Focer 2, connent to RX on CF2
-D CAN_TX_PIN=_26
-D CAN_RX_PIN=_27
[FEATHER-ESP32]
build_flags=
${common_env_data.build_flags}
-D PIN_NEOPIXEL=4 ; DIN of WS28xx stripe for front- / backlight, only needed if WS28xx is used
; -D MOSFET_PIN_1=22 ; PWM signal for MOSFET 1 (front white, back red), only needed if COB is used
; -D MOSFET_PIN_2=23 ; PWM signal for MOSFET 2 (front red, back white), only needed if COB is used
; -D PIN_FORWARD=18 ; digital signal from Cheap Focer 2 if direction is forward
; -D PIN_BACKWARD=19 ; digital signal from Cheap Focer 2 if direction is backward
; -D PIN_BRAKE=21 ; digital signal from Cheap Focer 2 if electric motor brakes is on
-D BUZPIN=14 ; PIN for Piezo buzzer for acoustic signals (e.g. battery warning)
-D BATTERY_PIN=34 ; analog input for battery monitor, connected to voltage divider
-D LIGHT_BAR_PIN=13 ; DIN of WS28xx for battery indicator
-D VESC_RX_PIN=7 ; UART RX to Cheap Focer 2, connent to TX on CF2
-D VESC_TX_PIN=8 ; UART TX to Cheap Focer 2, connent to RX on CF2
-D CAN_TX_PIN=_26
-D CAN_RX_PIN=_27
[ESP32-S3]
build_flags=
${common_env_data.build_flags}
-D PIN_NEOPIXEL=3 ; DIN of WS28xx stripe for front- / backlight, only needed if WS28xx is used
; -D MOSFET_PIN_1= ; PWM signal for MOSFET 1 (front white, back red), only needed if COB is used
; -D MOSFET_PIN_2= ; PWM signal for MOSFET 2 (front red, back white), only needed if COB is used
-D PIN_FORWARD=11 ; digital signal from Cheap Focer 2 if direction is forward
-D PIN_BACKWARD=12 ; digital signal from Cheap Focer 2 if direction is backward
-D PIN_BRAKE=13 ; digital signal from Cheap Focer 2 if electric motor brakes is on
-D BUZPIN=38 ; PIN for Piezo buzzer for acoustic signals (e.g. battery warning)
-D BATTERY_PIN=33 ; analog input for battery monitor, connected to voltage divider
-D LIGHT_BAR_PIN=2 ; DIN of WS28xx for battery indicator
-D VESC_RX_PIN=44 ; UART RX to Cheap Focer 2, connent to TX on CF2
-D VESC_TX_PIN=43 ; UART TX to Cheap Focer 2, connent to RX on CF2
-D CAN_TX_PIN=16
-D CAN_RX_PIN=17
-D ESP32S3
[AVASPARK-RGB]
build_flags=
${common_env_data.build_flags}
-D PIN_NEOPIXEL_FRONT=18 ; DIN of WS28xx stripe for front light, only needed if WS28xx is used
-D PIN_NEOPIXEL_BACK=17 ; DIN of WS28xx stripe for back light, only needed if WS28xx is used
;-D MOSFET_PIN_1=22 ; PWM signal for MOSFET 1 (front white, back red), only needed if COB is used
;-D MOSFET_PIN_2=23 ; PWM signal for MOSFET 2 (front red, back white), only needed if COB is used
;-D PIN_FORWARD=18 ; digital signal from Cheap Focer 2 if direction is forward
;-D PIN_BACKWARD=19 ; digital signal from Cheap Focer 2 if direction is backward
;-D PIN_BRAKE=21 ; digital signal from Cheap Focer 2 if electric motor brakes is on
-D BUZPIN=4 ; PIN for Piezo buzzer for acoustic signals (e.g. battery warning)
-D BATTERY_PIN=34 ; analog input for battery monitor, connected to voltage divider
-D LIGHT_BAR_PIN=19 ; DIN of WS28xx for battery indicator
;-D VESC_RX_PIN=32 ; UART RX to Cheap Focer 2, connent to TX on CF2
;-D VESC_TX_PIN=33 ; UART TX to Cheap Focer 2, connent to RX on CF2
-D CAN_TX_PIN=_33
-D CAN_RX_PIN=_32
-D PIN_BOARD_LED=16 ; Onboard LED for avaspark-rgb
-D BMS_TX_PIN=23 ; Map UART RX to BMS TX Pin
-D BMS_ON_PIN=25 ; Map GPIO to trigger IRF540N 100v N-channel mosfet which emulates momentary button for OWIE BMS on (battery voltage on blue wire) to ground. Connect the Source pin of the MOSFET to ground. Connect the Drain pin to the BMS's wake-up wire. Connect the Gate pin to the microcontroller's TX pin.
[env:native]
platform = native
[env:wemos_d1_mini32]
platform = espressif32
board = wemos_d1_mini32
framework = arduino
monitor_speed = 115200
upload_Speed = 921600
#upload_Port = /dev/cu.wchusbserial54FC0080641
board_build.partitions = default.csv
lib_deps = ${common_env_data.lib_deps_external}
build_flags = ${ESP32.build_flags} -D LED_WS28xx -D CANBUS_ENABLED -D CANBUS_ONLY
monitor_filters =
time
esp32_exception_decoder
; build_type = debug
extra_scripts = pre:change_firmware_name.py
custom_firmware_name = firmware_wemos_d1_mini32
[env:wemos_d1_mini32_cob]
extends = env:wemos_d1_mini32
build_flags = ${ESP32.build_flags} -D LED_COB -D CANBUS_ENABLED -D CANBUS_ONLY
custom_firmware_name = firmware_wemos_d1_mini32_cob
[env:wemos_d1_mini32_uart]
extends = env:wemos_d1_mini32
build_flags = ${ESP32.build_flags} -D LED_WS28xx
custom_firmware_name = firmware_wemos_d1_mini32_uart
[env:wemos_d1_mini32_cob_uart]
extends = env:wemos_d1_mini32
build_flags = ${ESP32.build_flags} -D LED_COB
custom_firmware_name = firmware_wemos_d1_mini32_cob_uart
[env:nodemcu-32s]
platform = espressif32
board = nodemcu-32s
framework = arduino
monitor_speed = 115200
board_build.partitions = default.csv
lib_deps =
${common_env_data.lib_deps_external}
build_flags =
${ESP32.build_flags} -D LED_WS28xx -D CANBUS_ENABLED -D CANBUS_ONLY
extra_scripts = pre:change_firmware_name.py
custom_firmware_name = firmware_nodemcu-32s
[env:avaspark-rgb]
platform = espressif32
board = nodemcu-32s
framework = arduino
monitor_speed = 115200
board_build.partitions = default.csv
lib_deps =
${common_env_data.lib_deps_external}
build_flags =
${AVASPARK-RGB.build_flags} -D LED_WS28xx -D CANBUS_ENABLED -D CANBUS_ONLY
extra_scripts = pre:change_firmware_name.py
custom_firmware_name = firmware_avaspark-rgb
[env:lolin_wemos_s3_mini]
platform = espressif32
board = lolin_s3_mini
framework = arduino
monitor_speed = 115200
upload_Speed = 921600
board_build.partitions = default.csv
lib_deps = ${common_env_data.lib_deps_external}
build_flags = ${ESP32-S3.build_flags} -D LED_WS28xx -D CANBUS_ENABLED -D CANBUS_ONLY
monitor_filters =
time
esp32_exception_decoder
; build_type = debug
extra_scripts = pre:change_firmware_name.py
custom_firmware_name = firmware_lolin_wemos_s3_mini
[env:lolin_wemos_s3_mini_cob]
extends = env:lolin_wemos_s3_mini
build_flags = ${ESP32-S3.build_flags} -D LED_COB -D CANBUS_ENABLED -D CANBUS_ONLY
custom_firmware_name = firmware_lolin_wemos_s3_mini_cob
[env:lolin_wemos_s3_mini_uart]
extends = env:lolin_wemos_s3_mini
build_flags = ${ESP32-S3.build_flags} -D LED_WS28xx
custom_firmware_name = firmware_lolin_wemos_s3_mini_uart
[env:lolin_wemos_s3_mini_cob_uart]
extends = env:lolin_wemos_s3_mini
build_flags = ${ESP32-S3.build_flags} -D LED_COB
custom_firmware_name = firmware_lolin_wemos_s3_mini_cob_uart
[env:feather_esp32]
platform = espressif32
board = featheresp32
framework = arduino
monitor_speed = 115200
upload_Speed = 921600
board_build.partitions = default.csv
lib_deps = ${common_env_data.lib_deps_external}
build_flags =
${FEATHER-ESP32.build_flags} -D LED_WS28xx -D CANBUS_ENABLED -D CANBUS_ONLY
custom_firmware_name = firmware_feather_esp32
[env:m5stack-stamps3]
platform = espressif32
board = m5stack-stamps3
framework = arduino
build_flags = ${ESP32-S3.build_flags} -D LED_WS28xx -D CANBUS_ENABLED -D CANBUS_ONLY
monitor_filters =
time
esp32_exception_decoder
; build_type = debug
extra_scripts = pre:change_firmware_name.py
custom_firmware_name = firmware_m5stack_stamps3