Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin Mapping for T-Relay with 4 Relays #38

Open
JohannesNeu opened this issue Sep 14, 2024 · 3 comments
Open

Pin Mapping for T-Relay with 4 Relays #38

JohannesNeu opened this issue Sep 14, 2024 · 3 comments

Comments

@JohannesNeu
Copy link

Hello everyone,

I bought a https://www.lilygo.cc/products/t-relay with 4 Relays and flashed tasmota, which works very well.

Next I would like to attach two to three MAX31865 via SPI and I am therefore looking for the correct PINs.
According to this schematic: https://github.com/Xinyuan-LilyGO/LilyGo-T-Relay/blob/main/Schematic/T_Relay4_ESP32.pdf
(page one upper right corner) The proper PINs on the header would be:

  • Header PIN 5 = GPIO PIN 14 [IO14] = CLK
  • Header PIN 7 = GPIO PIN 15 [IO15] = MOSI
  • Header PIN 6 = GPIO PIN 2 [IO2] = MISO

The schematics describe a "ESP32-WROVER-B".
While the ESP on my board is labeled "ESP32-WROVER-E"

According to the ESP32-WROVER-E datasheet from Espressif: https://www.espressif.com/sites/default/files/documentation/esp32-wrover-e_esp32-wrover-ie_datasheet_en.pdf (page 5 - 7) the PINs would be different (table 4).

  • Header PIN 5 = GPIO PIN 14 [IO14] = HSPICLK = CLK
  • Header PIN 15 = GPIO PIN 39 [IO39] = HSPID = MOSI
  • Header PIN 9 = GPIO PIN 12 [IO12] = HSPIQ = MISO

The IO15, which is used as MOSI in the lilygo schematics is the HSPICS0 chip select according to the Espressif documentation and IO2 is HSPIWP according to it.

I would appreciate your help to figure out which configuration is correct and if both are feasible an explanation where this difference comes from.

kind regards,
Johannes

@lewisxhe
Copy link
Contributor

No, you just need to specify which GPIO to use

int sck = Less than GPIO 33;
int miso = any_pin;
int mosi = Less than GPIO 33;
SPI.begin(sck,miso,mosi);

@JohannesNeu
Copy link
Author

Thank you for the reply, but what you are describing is software SPI, right?
I tried it with tasmota and if I want to use SSPI it works with every pin.
But what if i want to use hardware SPI ?

@lewisxhe
Copy link
Contributor

This is hardware SPI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants