I am using an ESP8266-01 with an Arduino nano. I am able to configure the ESP and connect to the network, but when I attempt to send data to ubidots, it fails with “Error CIPSEND.”
Here is a minimized version of my code:
#include <Filters.h>
#include <UbidotsESP8266.h>
#include <SoftwareSerial.h>
#define SSID "removed"
#define PASS "removed"
#define TOKEN "removed"
#define ID "removed"
Ubidots client(TOKEN);
// A bunch of other variables for the logic of the program that spits out a single float to be sent to ubidots
float float_variable = 0;
void setup() {
Serial.begin( 9600 ); // start the serial port
client.wifiConnection(SSID,PASS); // connect ESP8266 to network
}
void loop() {
// A bunch of logic that results in a float variable
Serial.print(float_variable);
sendData(float_variable);
}
void sendData(float data) {
Serial.print( "\n\nSending data to uibdots\n" );
client.add(ID,data);
client.sendAll();
Serial.print( "\nDone sending.\n" );
}
Here is the output. It's somewhat garbled, but you can get the idea of what's going on.
=>582fc4737625425ae5bdf0ad:0.17$,
Response of ESP8266:
AT+CIPMU=0
OK
Response of ESP8266:
ե�RST@RT=“TP”,“�aoslate.ubidots.com”,0Lj
CONNECT
OK
CLOSED
Response of ESP8266:
AT+CIPM�TT�j
OKC�
Response of ESP8266:
AT+CIPSEND
ERSOR
Error CIPSEND
I've already updated the ubidots-esp8266 library to correct the baud rate (115200 in my case) as documented here: http://community.ubidots.com/t/solved-esp-01-cipmode-error-need-help-with-solving-it/452/21.
Also, I’m using a YwRobot to get accurate 3.3v and 5v and a power logic level converter to protect the 8266 from the Arduino 5v levels.
Does anyone have an idea what’s going wrong?