-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathplatformio.ini
159 lines (136 loc) · 4.2 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
[platformio]
include_dir = .
src_dir = .
extra_configs =
credentials.ini
;; Uncomment one of these to select which board to build for
default_envs = test
; default_envs = live
; default_envs = leonardo
; default_envs = promicro
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The testbed ESP32 board on my workbench
[env:test]
board = arducam_iotai
hostname = softubtest
;; OTA upload
upload_port = ${env:test.hostname}.local
upload_protocol = espota
;; Serial upload
; upload_port = /dev/cu.usbserial-0001
; upload_flags =
; monitor_port = /dev/cu.usbserial-0001
;; Alternate: WeMos board:
; board = wemos_d1_r32
; upload_port = /dev/cu.usbserial-3340
; monitor_port = /dev/cu.usbserial-3340
;; This should work for the WeMos board, but it doesn't.
; board = esp32doit-espduino
; ;; At the moment, I need to force a later version of framework-arduinoespressif32, due to a bug in the pins file for this board.
; platform_packages =
; platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
extends =
esp32
ota_update
build_flags =
${esp32.build_flags}
${ota_update.build_flags}
-D MDNS_NAME=\"${env:test.hostname}\"
; -D SERIAL_DEBUG=1
-D OLED_DISPLAY=1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The board that's actually installed in the hot tub
[env:live]
board = arducam_iotai
;; This board is close to the IoTai, but it's missing the "D#" and "S#" pin definitions.
; board = esp32cam
hostname = softub
;; OTA upload
upload_port = ${env:live.hostname}.local
upload_protocol = espota
;; Serial upload
; upload_port = /dev/cu.usbserial-0001
; upload_flags =
; monitor_port = /dev/cu.usbserial-0001
extends =
esp32
ota_update
build_flags =
${esp32.build_flags}
${ota_update.build_flags}
-D MDNS_NAME=\"${env:live.hostname}\"
; -D SERIAL_DEBUG=1
; -D OLED_DISPLAY=1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The Leonardo board I sometimes use for testing
[env:leonardo]
platform = atmelavr
board = leonardo
upload_port = /dev/cu.usbmodem324201
monitor_port = /dev/cu.usbmodem324201
lib_deps =
${env.lib_deps}
build_flags =
; -D SERIAL_DEBUG=1
-D OLED_DISPLAY=1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; A pro micro I've got set up on a breadboard
[env:promicro]
platform = atmelavr
board = sparkfun_promicro16
upload_port = /dev/cu.usbmodem324201
monitor_port = /dev/cu.usbmodem324201
lib_deps =
${env.lib_deps}
build_flags =
; -D SERIAL_DEBUG=1
-D OLED_DISPLAY=1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Default (example) credentials.
;; These can be set to your actual credentials in one of two ways.
;; either:
;; - change them inline here (in which case you'll need to be careful not to commit them)
;; or:
;; - copy this section to a file named credentials.ini in this directory.
;;
;; In the latter case, the .gitignore file will prevent that file from accidentally being committed,
;; and the settings there will override this section due to the extra_configs setting in the [platformio] section above.
[credentials]
wifi_ssid = "SSID"
wifi_password = "password"
;; Generate a shared secret and uncomment everything below to enable auth for OTA updates
;; (highly recommended if you've got OTA updates turned on!)
; upload_auth = "SHAREDSECRET"
upload_flags =
; --auth=${upload_auth}
build_flags =
; -D OTA_PASSWORD=\"${upload_auth}\"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; common build options common to the esp32 variants.
;; This also assumes building the web server.
[esp32]
platform = espressif32
lib_deps =
${env.lib_deps}
pedroalbuquerque/ESP32WebServer
monitor_speed = 115200
build_flags =
-D WEBSERVER=1
-D WEBSERVER_DEBUG=1
-D WEBSERVER_REMOTE_CONTROL=1
-D SERIAL_DEBUG_SPEED=\"${esp32.monitor_speed}\"
-D WIFI_SSID=\"${credentials.wifi_ssid}\"
-D WIFI_PASSWORD=\"${credentials.wifi_password}\"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; build options for OTA updates.
[ota_update]
extends = credentials
build_flags =
${credentials.build_flags}
-D OTA_UPDATE=1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Common settings for all environments
[env]
framework = arduino
lib_deps =
olikraus/U8g2