Buena noche foro, estaba intentando utilizar el siguiente código, ya que empiezo a hacer practicas para entender como funciona arduino pero el siguiente código me da el siguiente error 'MQTT' does not name a type; did you mean 'MQTT_H'?
#include <MQTTClient.h>
#include <ESP8266WiFi.h>
#include <MQTT.h>
#include <EEPROM.h>
#define DEBUG
#define AP_SSID "CLARO_2012E8"
#define AP_PASSWORD "5127F5BEE8"
#define EIOTCLOUD_USERNAME "edson rodas"
#define EIOTCLOUD_PASSWORD "Karina51985529"
// create MQTT object //
#define EIOT_CLOUD_ADDRESS "cloud.iot-playground.com"
#define PIN_PUMP BUILTIN_LED //D0 // // nodemcu built in LED//
#define PIN_BUTTON D3 // nodemcu flash button//
#define PIN_HUM_ANALOG A0 // humidity pin//
#define MAX_ANALOG_VAL 956
#define MIN_ANALOG_VAL 250
#define IRRIGATION_TIME 10 // irrigation time in sec//
#define IRRIGATION_PAUSE_TIME 300 // irrigation pause time in sec - only for auto irrigator//
// irrigator state //
typedef enum {
s_idle = 0, // irrigation idle//
s_irrigation_start = 1, // start irrigation//
s_irrigation = 2, // irrigate//
s_irrigation_stop = 3, // irrigation stop//
} e_state;
#define CONFIG_START 0
#define CONFIG_VERSION "v01"
struct StoreStruct {
// This is for mere detection if they are your settings//
char version[4];
// The variables of your settings//
uint moduleId; // module id//
} storage = {
CONFIG_VERSION,
// The default module 0//
0,
};
#define PARAM_HUMIDITY_TRESHOLD "Sensor.Parameter1"
#define PARAM_MANUAL_AUTO_MODE "Sensor.Parameter2"
#define PARAM_PUMP_ON "Sensor.Parameter3"
#define PARAM_HUMIDITY "Sensor.Parameter4"
#define MS_IN_SEC 1000; // 1S //
MQTT myMqtt("", EIOT_CLOUD_ADDRESS, 1883);
// intvariables//
int state;
bool stepOk = false;
int soilHumidityThreshold;
bool autoMode;
String valueStr("");
String topic("");
boolean result;
int lastAnalogReading;
bool autoModeOld;
int soilHumidityThresholdOld;
unsigned long startTime;
int soilHum;
int irrigatorCounter;
void setup() {
state = s_idle;
pinMode(PIN_PUMP, OUTPUT);
pinMode(PIN_BUTTON, INPUT);
autoMode = false;
stepOk = false;
soilHumidityThresholdOld = -1;
startTime = millis();
soilHum = -1;
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.begin(AP_SSID, AP_PASSWORD);
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(AP_SSID);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
};
