fix sds serial compile error

This commit is contained in:
cyberman54 2022-11-01 20:41:42 +01:00
parent 681118c2ec
commit 1ccdf54bb0

View File

@ -18,7 +18,8 @@ static float pm10 = 0.0, pm25 = 0.0;
// init // init
bool sds011_init() { bool sds011_init() {
sds.begin(9600, SERIAL_8N1, SDS_RX, SDS_TX); Serial2.begin(9600, SERIAL_8N1, SDS_RX, SDS_TX);
sds.begin();
sds011_wakeup(); sds011_wakeup();
ESP_LOGI(TAG, "SDS011: %s", sds.queryFirmwareVersion().toString().c_str()); ESP_LOGI(TAG, "SDS011: %s", sds.queryFirmwareVersion().toString().c_str());
sds.setQueryReportingMode(); sds.setQueryReportingMode();