ESP8266 Developer Zone The Official ESP8266 Forum 2015-11-23T17:43:37+08:00 https://bbs.espressif.com:443/feed.php?f=65&t=1403 2015-11-23T17:43:37+08:00 2015-11-23T17:43:37+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1403&p=4722#p4722 <![CDATA[Re: ESP-01 and Arduino Controlled Robotic Hand - Code Problems]]>
If the " AT+CIPSTART="TCP","192.168.10.10",80 " failed, could you try to call it again later ?

Maybe when you send the command above, the TCP server is just not ready, you can try to connect it again later.

Statistics: Posted by ESP_Faye — Mon Nov 23, 2015 5:43 pm


]]>
2015-11-19T05:04:15+08:00 2015-11-19T05:04:15+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1403&p=4656#p4656 <![CDATA[ESP-01 and Arduino Controlled Robotic Hand - Code Problems]]>
I don't now for sure if this is the right place to put this, if it's not than just throw it to the place it should be :)

I'm hoping you can help me figure out how to make this project work. The idea is that we build a sensor glove which helds five bend sensors, an arduino nano and an ESP8266-01. On the other end we have an InMoov 3D Hand, five servo's, another arduino nano and another ESP8266-01. The set-up works flawless and the only problem we get is with the ESP's sending data to one another. We now do it on the way described in the code below:

Sender:

Code:

#include <SoftwareSerial.h>

#define DEBUG true
int bendsensor1 = A0;
int bendsensor2 = A1;
int val1=0;
int val2=0;
SoftwareSerial esp8266(2, 3);

void setup()
{
  Serial.begin(9600);
  esp8266.begin(115200);
  sendData("AT+RST\r\n", 2000, DEBUG);
  sendData("AT+CIOBAUD=9600\r\n", 2000, DEBUG);
  esp8266.begin(9600);
  sendData("AT+CWMODE=3\r\n", 2000, DEBUG);
  sendData("AT+CWJAP=\"test\",\"test\"\r\n", 2000, DEBUG);
  delay(15000);
  sendData("AT+CIPSTART=\"TCP\",\"192.168.10.10\",80\r\n", 2000, DEBUG);
}

void loop()
  val1=analogRead(bendsensor1);
  val2=analogRead(bendsensor2);

  sendData("AT+CIPSEND=3\r\n", 100, DEBUG);
  Serial.println(val1);
 
  sendData("AT+CIPSEND=1\r\n", 100, DEBUG);
  Serial.println(val2);
}


And the serial output would look like:

Code:

AT+CWMODE=3


OK
AT+CWJAP="test","test"

WIFI DISCONNECT
WIFI CONNECTED
WIFI DISCONNECT
WIFI CONNECTED
WIFI GOT IP

AT+CIPSTART="TCP","192.168.10.10",80


ERROR
CLOSED
AT+CIPSEND=3

link is not valid

ERROR
724
AT+CIPSEND=1

link is not valid

ERROR
0


Receiver:

Code:

#include <SoftwareSerial.h>

#define DEBUG true

SoftwareSerial esp8266(2, 3);

void setup()
{
  Serial.begin(9600);
  esp8266.begin(115200);
  sendData("AT+RST\r\n", 2000, DEBUG);
  sendData("AT+CIOBAUD=9600\r\n", 2000, DEBUG);
  esp8266.begin(9600);
  sendData("AT+CWMODE=3\r\n", 50, DEBUG);
  sendData("AT+CWSAP=\"test\",\"test\",1,0\r\n", 50, DEBUG);
  sendData("AT+CIPAP=\"192.168.10.10\"\r\n", 50, DEBUG);
  sendData("AT+CIPMUX=1\r\n", 50, DEBUG);
  sendData("AT+CIPSERVER=1,80\r\n", 50, DEBUG);
  sendData("AT+CIFSR\r\n", 50, DEBUG);
  sendData("+IPD", 50, DEBUG);
}

void loop()
{
}


And the serial output would look like:

Code:

AT+CWMODE=3


OK
AT+CWSAP="test","test",1,0


OK
AT+CIPAP="192.168.10.10"


OK
AT+CIPMUX=1


OK
AT+CIPSERVER=1,80


OK
AT+CIFSR

+CIFSR:APIP,"192.168.10.10"
+CIFSR:APMAC,bé&#8226;é¢Ò2Ñ:74:dc"
+CIFSR:STAIP,"0.0.0.0"
+CIFSR:STAMAC,"18:fe:34:f4:74:dc"

OK
+IPD


Does anyone see what the problem could be? Or does anyone know if there is another way to send this data? And how fast can I make this sending?

Statistics: Posted by ProAce — Thu Nov 19, 2015 5:04 am


]]>