ESP8266 problem sketch error

Well, the latest Settings.h example from here looks like this for the NodeMCU/Wemos D1 Mini board…

#if defined(USE_NODE_MCU_BOARD) || defined(USE_WEMOS_D1_MINI)

  #if defined(USE_WEMOS_D1_MINI)
    #warning "This board does not have a button. Connect a button to gpio0 <> GND"
  #endif

  #define BOARD_BUTTON_PIN            0
  #define BOARD_BUTTON_ACTIVE_LOW     true

  #define BOARD_LED_PIN               2
  #define BOARD_LED_INVERSE           true
  #define BOARD_LED_BRIGHTNESS        255

It’s not surprising that your board isn’t responding to presses of the GPIO0 (D3) button, or flashing the onboard LED which is connected to GPIO2 (D4), as you aren’t specifying these as the button and LED pins in your sketch.

You’re actually using GOIO0 (D3) as SwitchPin2

I’s also avoid using GPIO10, GPIO3 and GPIO16 if I were you, which probably means you ought to be using an ESP32.

You should also do yourself a favour by always using GOIO numbers in your sketch, with the correct “D” number alongside in the comments as that makes it much easier top track which pins are being used for what.

You may find this link useful…

as well as this one…

Pete.