Regarding Project 4 of ‘Learn ESP32 With Arduino’, I am building the sender side on a perf board. I am also using MQTT instead of LoRa, and want to add a SD Card module to the sender/publisher side. However, GPIO 15 would be occupied by both the temperature sensor and the SD card module. Am I correct that I can switch the temp sensor data to any other unoccupied GPIO, or switch the SPI CS GPIO 15 to GPIO 5?
Also, the DOIT board only has one GND pin. If I connect the temp and moisture grounds together the temp and moisture don’t send good data. So I tried using a DEVKITV1 board with two separate GND pins and it seems to work. But then I added the SD Card module and connected its GND to the temp GND and now the temp data is bad. I am using the temp circuit as shown in the course. How can I solve this? Thanks
Hi Jack.
Yes, you can use other GPIO for the temperature sensor or other GPIO for the CS pin, as long as you indicate that in the code.
As for the GND, that’s weird behavior. Theoretically, you can use the same GND for everything even if it is just one GND pin. Are you sure your connections are ok? Do you provide enough power for all components?
Regards,
Sara
Yes, it is weird. Now it is working. I’m finding the cheap sensors are a bit unreliable, non-linear and difficult to calibrate at times.