Comments on: ESP32 SPI Communication: Set Pins, Multiple SPI Bus Interfaces, and Peripherals (Arduino IDE) https://randomnerdtutorials.com/esp32-spi-communication-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Mon, 02 Jun 2025 15:13:12 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Sara Santos https://randomnerdtutorials.com/esp32-spi-communication-arduino/#comment-1053545 Mon, 02 Jun 2025 15:13:12 +0000 https://randomnerdtutorials.com/?p=113804#comment-1053545 In reply to Rene.

Hi.
I never tried it.
But, in theory, yes. As long as you have enough pins.
You can share the SPI pins for both displays, as long as you have a different CS pin for each display.

Regards,
Sara

]]>
By: Rene https://randomnerdtutorials.com/esp32-spi-communication-arduino/#comment-1053477 Mon, 02 Jun 2025 11:40:12 +0000 https://randomnerdtutorials.com/?p=113804#comment-1053477 Hi, is it also possible to connect more then two displays on a esp32.

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-spi-communication-arduino/#comment-1019402 Mon, 24 Mar 2025 10:49:22 +0000 https://randomnerdtutorials.com/?p=113804#comment-1019402 In reply to Parthasarathi Elangovan.

Hi.
We’re using the ESP32 DOIT V1 board.
It works well with the examples and using both SPIs.
I thought most ESP32 boards were compatible.
Regards,
Sara

]]>
By: Parthasarathi Elangovan https://randomnerdtutorials.com/esp32-spi-communication-arduino/#comment-1019227 Sun, 23 Mar 2025 20:09:05 +0000 https://randomnerdtutorials.com/?p=113804#comment-1019227 Hi Randomnerstutorials,
It was a good tutorial.
I have some doubts, request that you please give me your comments about below query.
1. Which ESP series microcontroller will work both the HSPI and VSPI?
2. I am using ESP-32_WRROM-32 development board. Here, I can access the VSPI not a HSPI.
3. Can ESP-32_WRROM-32 work both HSPI and VSPI? if not please suggest the suitable microcontroller for me in the ESP32 series?

Thanks
Parthasarathi

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-spi-communication-arduino/#comment-1003173 Mon, 27 Jan 2025 18:23:14 +0000 https://randomnerdtutorials.com/?p=113804#comment-1003173 In reply to Wijnand Nijs.

Hi.
I think you can initialize the display as follows:
Adafruit_ST7789 = Adafruit_ST7789(int8_t cs, int8_t dc, int8_t mosi, int8_t sclk, int8_t rst = -1);

See the Adafruit_ST7789.h file: https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/Adafruit_ST7789.h

Regards,
Sara

]]>
By: Wijnand Nijs https://randomnerdtutorials.com/esp32-spi-communication-arduino/#comment-1003144 Mon, 27 Jan 2025 15:02:13 +0000 https://randomnerdtutorials.com/?p=113804#comment-1003144 OK, I already found that only 3 pins of the display are really relevant for the data communication: MOSI (SDA on the display), SCK and DC (data/control). The problem is MOSI and SCK. How can I force the Adafruit library that he do’nt use the default SPI pins (used for the LoRa module and also not on the edge pads) but the pins for example used by @Stephan for his card reader?

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-spi-communication-arduino/#comment-1002990 Sun, 26 Jan 2025 19:29:40 +0000 https://randomnerdtutorials.com/?p=113804#comment-1002990 In reply to Wijnand Nijs.

Hi.
Using that library, you can defined your display pins as follows:

// Define display pin connections
#define TFT_CS 10
#define TFT_RST 9 // Or set to -1 and connect to Arduino RESET pin
#define TFT_DC 8

// Initialize the display
Adafruit_ST7796S display(TFT_CS, TFT_DC, TFT_RST);

You need to find the pinout of your board.
Regards,
Sara

]]>
By: Stephan https://randomnerdtutorials.com/esp32-spi-communication-arduino/#comment-1002899 Sun, 26 Jan 2025 12:24:37 +0000 https://randomnerdtutorials.com/?p=113804#comment-1002899 In reply to Wijnand Nijs.

Hello,
I ran this script on my TTGO and also got the non-matching default pins as output. The internal card reader works on my TTGO:
// internal card reader e.g. TTGO-T8 V1-7
#define SD_SCK 14
#define SD_MISO 2
#define SD_MOSI 15
#define SD_CS 13

]]>
By: Wijnand Nijs https://randomnerdtutorials.com/esp32-spi-communication-arduino/#comment-1002797 Sat, 25 Jan 2025 22:26:17 +0000 https://randomnerdtutorials.com/?p=113804#comment-1002797 Hai, First your guides are perfect, but now I need realy help. I want to control a GMT130-V1.0 240×240 (ST7789) by the ESP32 TTGO T_Beam withe the Adafruit_ST7789 library but come into SPI pinning troubles. I read your manuals and try a lot, but no ting works.
First with:
//Find the default SPI pins for your board
I found:
MOSI: 27
MISO: 19
SCK: 5
SS: 18
But those pins are not to find on the connector. I think the are used for the LoRa module.
How can I force the Adafruit lib to use other pins for MOSI and SCLK? Can you give advice about preferable pins to connect?
Thanks and regards…

]]>
By: Sara Santos https://randomnerdtutorials.com/esp32-spi-communication-arduino/#comment-1002664 Sat, 25 Jan 2025 11:41:31 +0000 https://randomnerdtutorials.com/?p=113804#comment-1002664 In reply to Phil.

Hi.
I have this tutorial and covers using custom pins with the microSD card: https://randomnerdtutorials.com/esp32-microsd-card-arduino/#sdcardcustompins
I hope this helps.
Regards,
Sara

]]>