WT32-ETH01 and PT100 (MAX31865) - SPI pins

I need to read 3 PT100 sensors and send them to a specific URL.
I build a POC using Wemos D1 (ESP8266) using the below code:

esphome:
  name: test1
  friendly_name: Test1

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "75oS1vU5FSHAoso4S0EJOf1z8K14wJsIvLLd6luxR1g="

ota:
  - platform: esphome
    password: "45488fe0846f927f7f754a564bf51c61"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Test1 Fallback Hotspot"
    password: "ce6b5f7o5l2Q"

captive_portal:

web_server:

switch:
  - platform: gpio
    pin: D4
    name: "Led"
    inverted: True

button:
  - platform: restart
    name: "Restart"
    
spi:
  clk_pin: D5
  miso_pin: D6
  mosi_pin: D7
  
sensor:
  - platform: max31865
    name: "Test 1"
    cs_pin: D2
    reference_resistance: 430 Ω
    rtd_nominal_resistance: 100 Ω
    rtd_wires: 3
    unit_of_measurement: "°C"
    device_class: "temperature"
    state_class: "measurement"
    accuracy_decimals: 1
    update_interval: 10s

  - platform: max31865
    name: "Test 2"
    cs_pin: D3
    reference_resistance: 430 Ω
    rtd_nominal_resistance: 100 Ω
    rtd_wires: 3
    unit_of_measurement: "°C"
    device_class: "temperature"
    state_class: "measurement"
    accuracy_decimals: 1
    update_interval: 10s

I get two readings and everything works fine.
Now I’d like to use WT32-ETH01 instead of ESP8266, so I can use LAN.
The problem is that I don’t know which pins I should use to set up SPI.

I found this post: WT32-ETH01 SPI display wiring but I can’t read any useful information from it.
I also found this: WT32-ETH01 spi issue - #2 by maxgerhardt - PlatformIO IDE - PlatformIO Community, but again no wiring.

Did anyone use WT32-ETH01 with SPI (ideally with MAX31865)? Which pins should I use?

I use WT32-ETH01 v1.4 - https://pl.aliexpress.com/item/1005007390519513.html
and MAX31865 - https://pl.aliexpress.com/item/1005004561372911.html

Try with default pins:

spi:
  clk_pin: GPIO18
  miso_pin: GPIO19
  mosi_pin: GPIO23

Could you show those pins on the board?
I don’t see them in manual https://files.seeedstudio.com/products/102991455/WT32-ETH01_datasheet_V1.1-%20en.pdf


https://www.hackerspace-ffm.de/wiki/index.php?title=WT32-ETH01_ESP32_Modul_mit_LAN&mobileaction=toggle_view_desktop

I’m new to this board.

EDIT:
I flashed the board using bluetooth-proxies/wt32/wt32-eth01.yaml at e8e936ed23de2fd6df30058911a8b82ea35d3061 · esphome/bluetooth-proxies · GitHub, so to use Ethernet I use:

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO0_IN
  phy_addr: 1
  power_pin: GPIO16

but I need to attach MAX31865 to the board to read the temperature.

Ahh, sorry, the default Esp32 spi pins are not exposed on that board.
You don’t have a lot of available pins here… Try:

spi:
  clk_pin: GPIO14
  miso_pin: GPIO15
  mosi_pin: GPIO12

and GPIO4 for CS

Thank you for the update, I’ll check it when I’m home.
The plan is to have a display and read values from 4 sensors (using) four separate max31865 boards.
I searched for an alternative board, but even Olimex doesn’t have many pins :confused:

SPI is a bus, so you only need CS pin for every additional Max31865.
I guess RX2, TX2 and RS485 enable pins are ok as output pins. No idea what CFG pin supposed to serve…

This works fine for a single sensor:

spi:
  clk_pin: GPIO14
  miso_pin: GPIO15
  mosi_pin: GPIO12

sensor:
  - platform: max31865
    name: "Test 1"
    cs_pin: GPIO4
    reference_resistance: 430 Ω
    rtd_nominal_resistance: 100 Ω
    rtd_wires: 3
    unit_of_measurement: "°C"
    device_class: "temperature"
    state_class: "measurement"
    accuracy_decimals: 1
    update_interval: 10s

Now I’m going to add more, the target is 4 sensors, then a display.
Then you for the help, I’ll update this post if I get 4 sensors working.

I power off the board and now when I power it I get this error:

SPI_FAST_FLASH_BOOT

I’m not sure what could be the cause.
When I unplug MAX31865 board from WT32 (I only unplugged power) the board correctly connects to ethernet, but I get no readings

When compiling firmware I see this in the logs:

WARNING GPIO15 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO12 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins

any hints on what might be the problem? and how to fix it.

Like Esphome tells you, strapping pins. You need to try different pin combinations. If your Max31865 have pullups on those pins connected to GPIO12 and 15, the boot fails.
Instead of Gpio12, use Gpio17 for example.

Did you make changes to your previous “working” setup?