• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

SPI CS pin choices and GND issues

Q&A Forum › Category: ESP32 › SPI CS pin choices and GND issues
0 Vote Up Vote Down
Jack Douglas asked 3 years ago

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

Question Tags: SPI SD_Card
3 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

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

0 Vote Up Vote Down
Jack Douglas answered 3 years ago

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.

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Let’s hope it continues working as expected.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.