ESP8266 + Adafruit + IFTTT

Buenas Noches,

Escribo esto debido a que me aburrí de tratar de solucionar un problema que tengo.

Tengo conectado un ESP8266-01 a un led que simula ser un Rele.

Adicionalmente se conecta con Adafruit y IFTTT para dar la instrucción de encendido.

El problema está en que el ESP no conecta, queda entregando puntos infinitamente en el monitor Serie.

Agradecería que alguien pudiera darme una mano con esto.

Pego el código.

/************************ Adafruit IO Configuration *******************************/

// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME    "....."
#define IO_KEY         "....."

/******************************* WIFI Configuration **************************************/

#define WIFI_SSID       "....."
#define WIFI_PASS       "......"

#include "AdafruitIO_WiFi.h"
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

/************************ Main Program Starts Here *******************************/
#include <ESP8266WiFi.h>
#include <AdafruitIO.h>
#include <Adafruit_MQTT.h>
#include <ArduinoHttpClient.h>

#define LED_PIN 0
#define OTHER_PIN 2

// button state
int current = 0;
int last = 0;

// set up the 'command' feed
AdafruitIO_Feed *command = io.feed("lights");

void setup() {

  pinMode(LED_PIN, OUTPUT);
  pinMode(OTHER_PIN, OUTPUT);

  // start the serial connection
  Serial.begin(115200);

  // connect to io.adafruit.com
  Serial.print("Connecting to Adafruit IO");
  io.connect();
  
  // set up a message handler for the 'command' feed.
  // the handleMessage function (defined below)
  // will be called whenever a message is
  // received from adafruit io.
  command->onMessage(handleMessage);

  // wait for a connection
  while(io.status() < AIO_CONNECTED) {
    Serial.print(".");
    delay(500);
  }

  // we are connected
  Serial.println();
  Serial.println(io.statusText());

}

void loop() {

  // io.run(); is required for all sketches.
  // it should always be present at the top of your loop
  // function. it keeps the client connected to
  // io.adafruit.com, and processes any incoming data.
  io.run();


}

// this function is called whenever a 'command' message
// is received from Adafruit IO. it was attached to
// the command feed in the setup() function above.
void handleMessage(AdafruitIO_Data *data) {

  int command = data->toInt();

  if (command == 1){ //light up the LED
    Serial.print("received <- ");
    Serial.println(command);
     digitalWrite(LED_PIN, HIGH);
     digitalWrite(OTHER_PIN, HIGH);     
  } else {
    Serial.print("received <- ");
    Serial.println(command);
    digitalWrite(LED_PIN, LOW);
    digitalWrite(OTHER_PIN, LOW);
  }
}

Pregunta, porque nunca se sabe ¿reemplazaste los"...." por las claves necesarias?

#define IO_USERNAME    "....."
#define IO_KEY         "....."

/******************************* WIFI Configuration **************************************/

#define WIFI_SSID       "....."
#define WIFI_PASS       "......"

Hola, gracias.

De hecho copie y pegue el código bruto.

Las Claves y Usuarios los tengo claros.

Alguno de ellos debe estar fallando

 while(io.status() < AIO_CONNECTED) {
    Serial.print(".");
    delay(500);
  }

Ya sea la conexión a WIFI o la cuenta de Adafruit IO

Cambia esa parte de código a

 while(io.status() < AIO_CONNECTED) {
    Serial.print(io.status());
    delay(500);
  }

Muchas gracias, no se me había ocurrido.

Voy a probar que me arroja y comento.

Prueba también con

while(io.status() < AIO_CONNECTED) {
    Serial.println(io.statusText());
    delay(500);
  }

amigo tengo el mismo problema. Pudo solucionarlo?

Creo que está fuera de las normas responder en un hilo tan antiguo, deberías crear un hilo nuevo con tu problema, pero ya que has llegado aqui... probaste lo que sugirió el compañero? Más que nada para descartar errores de claves