Wemos S2 mini doesn't support PWM

Hi all,

I am trying to use a PWM output on Wemos S2 mini board with this basic config:

   board: lolin_s2_mini
   variant: esp32s2
     type: arduino

  - platform: speed
    id: oven_fan
    output: fan_pwm
    name: $name Fan
    speed_count: 100

  - platform: ledc
    id: fan_pwm
      number: 4
    min_power: 0 
    frequency: 22.5kHz

but seems that the PWM signal doesn’t came out to any GPIO pin. Is that supported or am I missing something in the configuration?
I had no problem at all with a ESP32 D1 Mini based on ESP32 WROOM 32.

Many thanks

I think that board got official support with the December release.

Do maybe check and test the official config?

  board: lolin_s2_mini
  type: esp-idf

As the docs say:

ESP-IDF framework

This is an alternative base framework for ESP32 chips, and recommended for variants of the ESP32 like ESP32S2, ESP32S3, ESP32C3 and single-core ESP32 chips.

1 Like

I would like to use the arduino framework in order to access to some utility functions with thr lambda code. Do you think it doesn’t support yet?

I’m running ESPHome 2022.12.6


There’s lots of people on Discord and HA forums having various issues with that board (including myself last time I tried, see below).

So it’s more that you might be on your own or need to dig through threads. The recommended framework would likely be more stable etc.

This mostly worked last time I tried.

You have one, I don’t. It’ll take you only a few minutes to try.