cyberman54 / ESP32-Paxcounter

Wifi & BLE driven passenger flow metering with cheap ESP32 boards

Home Page:https://cyberman54.github.io/ESP32-Paxcounter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SDS011 sensor + TTGOV1.6 LoRa issue on all pin except 19&23

FabTangi opened this issue · comments

After discussion in this issue :
#866
I treid with pin IO12 and IO35, but SDS011 was not detected.
I also tried on several other pin, and it seems SDS011 is only detected on 19&23 (which can not be used, as they are dedicated to Lora Chip)
Did any one succeed in using SDS011 and TTGO V1.6 ?
Cabling plan will be welcome !

Again, you need to assure that GPIO lines used for serial interface of SDS011 are free and not otherwise used by the hardware of your board. GPIO35 ist on TTGO v1.6.x used for battery monitoring.

But if you disable battery monitoring in hal file by setting
//#define BAT_MEASURE_ADC ADC1_GPIO35_CHANNEL // battery probe GPIO pin -> ADC1_CHANNEL_7
it will work with these settings

#define HAS_SDS011 1 // use SDS011
#define SDS_TX 12     // connect to RX on the SDS011
#define SDS_RX 35     // connect to TX on the SDS011

During power up you should see a line like this in serial terminal:

19:59:44.406 > [ 11432][I][main.cpp:366] setup(): init fine-dust-sensor
19:59:45.405 > [ 11940][I][sds011read.cpp:23] sds011_init(): SDS011: Firmware version [year.month.day]: 21.5.16

Other option is to find other unused GPIOs and use them instead.
Please don't open a new issue on this, since this is by sure not a software bug.
If you need support, use discussion tab for how to questions.