Enable blue LED when running on ESP32

This commit is contained in:
Magnus Persson 2022-03-31 16:51:27 +02:00
parent 58144a5187
commit fda5c6ff27
2 changed files with 5 additions and 1 deletions

View File

@ -129,6 +129,8 @@ void setup() {
} }
snprintf(&buf[0], sizeof(buf), "%6x", chipId); snprintf(&buf[0], sizeof(buf), "%6x", chipId);
Log.notice(F("Main: Started setup for %s." CR), &buf[0]); Log.notice(F("Main: Started setup for %s." CR), &buf[0]);
pinMode(PIN_LED, OUTPUT);
digitalWrite(PIN_LED, HIGH);
#endif #endif
printBuildOptions(); printBuildOptions();
@ -290,7 +292,7 @@ bool loopReadGravity() {
} }
return true; return true;
} else { } else {
Log.error(F("MAIN: No gyro value found, the device might be moving.")); Log.error(F("MAIN: No gyro value found, the device might be moving." CR));
} }
return false; return false;
} }

View File

@ -35,6 +35,7 @@ SOFTWARE.
#define PIN_SDA D3 #define PIN_SDA D3
#define PIN_SCL D4 #define PIN_SCL D4
#define PIN_DS D6 #define PIN_DS D6
#define PIN_LED 2
//#define PIN_A0 A0 //#define PIN_A0 A0
#else // defined (ESP32) #else // defined (ESP32)
#if defined (ESPRESSIF32_20) #if defined (ESPRESSIF32_20)
@ -51,6 +52,7 @@ SOFTWARE.
#define PIN_SCL 16 #define PIN_SCL 16
#define PIN_DS 19 #define PIN_DS 19
#define PIN_A0 36 #define PIN_A0 36
#define PIN_LED 2
#endif #endif
#define PIN_LED 2 #define PIN_LED 2