ubidots / ubidots-esp8266

Library for uploading ESP8266 devices to Ubidots
39 stars 28 forks source link

error: no matching function for call to 'Ubidots::Ubidots(const char*&, IotProtocol) #51

Open GMDionicio opened 3 years ago

GMDionicio commented 3 years ago

Hello, I downloaded the library and when compiling it gave me the following error

Error_Codigo_IOT_2

include

include

include

const char UBIDOTS = "BBFF-oVd052nHGVtYxYCWjQ2bkD6vx44m47"; // Clave Api de Ubidots const char WIFI = "RENGIFO"; const char* WIFI_CLAVE = "1005160081"; const int pinDatosDQ = 0; Ubidots ubidost(UBIDOTS,UBI_HTTP); //Protocolo de Comunicacion(HTTP) OneWire oneWireObjeto(pinDatosDQ); DallasTemperature sensorDS18B20(&oneWireObjeto); int Variable; bool bufferSent= false; void setup() {

Serial.begin(115200); ubidost.wifiConnect(WIFI,WIFI_CLAVE); Variable=50; Serial.begin(9600); // Iniciamos el bus 1-Wire sensorDS18B20.begin(); } void loop() { // Variable= analogRead(A0); //Serial.println(Variable); ubidost.add("Temperatura",sensorDS18B20.getTempCByIndex(0)); bufferSent= ubidost.send(); if(bufferSent){ Serial.println("los valores se enviaron al dispositivo");

} // Mandamos comandos para toma de temperatura a los sensores //Serial.println("Mandando comandos a los sensores"); sensorDS18B20.requestTemperatures(); // Leemos y mostramos los datos de los sensores DS18B20 Serial.print("Temperatura sensor : "); Serial.println(sensorDS18B20.getTempCByIndex(0)); //Serial.println(" C");

delay(1000); }