I can't control the turning on led

I hooked up ESP12F and was able to pass the data to the cloud (DHT11)
and today I can’t control the turning on led
Maybe I wrongly named pin?

#include <SPI.h>
#include <ESP8266WiFi.h>
#include <ThingerWifi.h>

ThingerWifi thing("scratch_book", "ESP12F", "*******");

int pin = 13;    // select the input pin 

void setup() {
  thing.add_wifi("********", "**********");

  thing["led"] << [](pson& in){
        in = (bool) digitalRead(pin);
        digitalWrite(pin, in ? HIGH : LOW);

void loop() {

Hi! the code seems to be ok, but I need to know what is the GPIO you used for control the led.

You have to add in the Void setup():

pinMode (pin, OUTPUT);

Thank you! :slight_smile: