Skip to content

Commit

Permalink
Merge pull request #161 from roberbike/esp32c3test
Browse files Browse the repository at this point in the history
test sps30 by i2c
  • Loading branch information
hpsaturn authored Jan 29, 2023
2 parents daa5965 + c58326e commit 058e79f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Sensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1614,9 +1614,12 @@ void Sensors::startI2C() {
#ifdef M5ATOM
enableWire1();
#endif
#if not defined(M5STICKCPLUS) && not defined(M5COREINK) && not defined(M5ATOM)
#if not defined(M5STICKCPLUS) && not defined(M5COREINK) && not defined(M5ATOM) && not defined(ESP32C3)
Wire.begin();
#endif
#ifdef ESP32C3
Wire.begin(19,18);
#endif
}

void Sensors::enableWire1() {
Expand Down
3 changes: 3 additions & 0 deletions src/Sensors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
#define PMS_RX 3
#define PMS_TX 1
#define DHT_SENSOR_PIN 19
#elif ESP32C3
#define PMS_RX 20
#define PMS_TX 21

#else // **DEFAULT** for legacy CanAirIO devices:
#define PMS_RX 17 // D1MIN1 / TTGOT7 / ESP32DEVKIT, also for main ESP32 dev boards use it
Expand Down

0 comments on commit 058e79f

Please sign in to comment.