File tree Expand file tree Collapse file tree 3 files changed +42
-4
lines changed
Expand file tree Collapse file tree 3 files changed +42
-4
lines changed Original file line number Diff line number Diff line change 77;
88; Please visit documentation for the other options and examples
99; https://docs.platformio.org/page/projectconf.html
10+ [common_env_data]
11+ build_flags =
12+ -D BUILD_ENV_NAME =$PIOENV
13+ -D BUILD_PLATFORM =$PIOPLATFORM
14+ -D BUILD_TIME =$UNIX_TIME
15+ -D CORE_DEBUG_LEVEL =3
1016
11- [env:espwroom32 ]
17+ [env:generic_espwroom32 ]
1218platform = espressif32
1319board = nodemcu-32s
1420framework = arduino
1521upload_port = COM4
16- platform_packages = platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
22+ platform_packages = platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git# 2.0.14
1723monitor_speed = 115200
18- build_flags = -DCORE_DEBUG_LEVEL =3
24+ build_flags =
25+ ${common_env_data.build_flags}
26+
27+ [env:xiao_esp32s3]
28+ platform = espressif32
29+ board = seeed_xiao_esp32s3
30+ framework = arduino
31+ upload_port = /dev/cu.usbmodem2101
32+ platform_packages = platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git# 2.0.14
33+ monitor_speed = 115200
34+ build_flags =
35+ ${common_env_data.build_flags}
Original file line number Diff line number Diff line change 11#ifndef OPENESPRESSOPROFILER_CONFIG_H
22#define OPENESPRESSOPROFILER_CONFIG_H
33
4+ #include <Arduino.h>
5+
6+ #ifndef BUILD_ENV_NAME
7+ #error "Add -D BUILD_ENV_NAME=$PIOENV to platformio.ini build_flags"
8+ #else
9+ #define generic_espwroom32 101
10+ #define xiao_esp32s3 102
11+ #endif
12+
13+ #if BUILD_ENV_NAME == generic_espwroom32
414#define LED_PIN 2
15+ #define INVERT_LED false
516#define PRESSURE_PIN 32
617
18+ #elif BUILD_ENV_NAME == xiao_esp32s3
19+ #define LED_PIN LED_BUILTIN
20+ #define INVERT_LED true
21+ #define PRESSURE_PIN A1
22+
23+ #else
24+ #error "BUILD_ENV_NAME NOT RECOGNIZED"
25+ #endif
26+
27+
728#define R1_OHMS 10000
829#define R2_OHMS 15000
930
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ void loop() {
143143 Serial.println (" ping" );
144144 lastPoll = now;
145145
146- digitalWrite (LED_PIN, deviceConnected);
146+ digitalWrite (LED_PIN, INVERT_LED ^ deviceConnected);
147147
148148 if (PRESSURE != nullptr ) {
149149 int16_t pressure = readPressure ();
You can’t perform that action at this time.
0 commit comments