I sent data from two soil moisture sensors to the Arduino and later sent this data to the Esp8266. To send, I used these methods of sending characters.
On the serial monitor, it presents this problem with these huge codes and the data is sent at certain periodic moments and is standard.
Greetings @rudsonth I hope this message finds you well,
I’ve tried reproducing the error that you mention without success, that is, it works as expected for me. I’ve tried the following with the following code snippet:
#include <SoftwareSerial.h>
#include "Ubidots.h"
const char *UBIDOTS_TOKEN = "BBFF-";
const char *WIFI_SSID = ""; // Put here your Wi-Fi SSID
const char *WIFI_PASS = ""; // Put here your Wi-Fi password
const char *DEVICE_LABEL = "esp8266";
int umi1;
int umi2;
Ubidots ubidots(UBIDOTS_TOKEN);
void setup()
{
Serial.begin(9600);
ubidots.wifiConnect(WIFI_SSID, WIFI_PASS);
if (!ubidots.wifiConnected())
{
Serial.println("NotConnected");
Serial.println("disconnecting ubidots.");
ubidots.wifiConnect(WIFI_SSID, WIFI_PASS);
}
}
void loop()
{
umi1 = random(1000000);
umi2 = random(1000000);
ubidots.add("var_resistivo", umi1);
ubidots.add("var_capacitivo", umi2);
bool bufferSent = false;
bufferSent = ubidots.send(DEVICE_LABEL);
if (bufferSent)
{
Serial.println(" Dados enviados! ");
}
else
{
Serial.println("DADOS NÃO ENVIADOS!");
}
}
As you can see, I’m generating random numbers to simulate the sensor, in order to discard that the error pertains to the library itself and is related to the library behind in charge of reading the sensor data. With that in mind, can you please test on your end by generating random numbers instead of using real sensor data?