Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test sps30 by i2c #161

Merged
merged 5 commits into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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