Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ESP8266 , need help
08-12-2015, 08:06 PM
Post: #1
ESP8266 , need help
Hello
I build a B-Robot but for the wifi I use an ESP8266 module.
One part of the configuration of the ESP module is permanent (AP mode, ID, pwd) but the not the UDP server.
An AT command (AT+CIPSTART …) is needded after power on.
As the JJROBOTS_OSC librarie redefine the serial1, it is not available (compilers errors).
For the test I use two sketches, one for ESP init and the second to drive the Robot : not very convenient !

So I need your help : how can I send the AT command from the Robot sketch (may be inside the OSC librarie) ??

Sorry for my bad English, and it’s my first use of Arduino , may be the hard way ….

Patrick
Find all posts by this user
Quote this message in a reply
08-20-2015, 09:19 AM
Post: #2
RE: ESP8266 , need help
Hi Patrick,
take a look to the new B-robot code here:https://github.com/jjrobots/B-ROBOT/tree/master/BROBOT
It supports the ESP8266 wifi module now

Cheers
Visit this user's website Find all posts by this user
Quote this message in a reply
08-20-2015, 11:36 AM (This post was last modified: 08-20-2015 11:53 AM by sasa999.)
Post: #3
RE: ESP8266 , need help
Why so complicated? I use your original previous sketch. All you need is write to esp8266 some strings for forwarding udp to serial.

WiFi.mode(WIFI_AP);
WiFi.softAP(ssid, password);

Udp.read(packetBuffer,UDP_TX_PACKET_MAX_SIZE);
Serial.write(packetBuffer,packetSize);

Samplest way is with Arduino ide. Once you have writen you forgot about esp8266, because it work themself.
There is some errors in your sketch - it reset throttle and stearing values but not reset sliders in osc app. All you need is send sample command to your mobile phone with two values 0.5 for throttle and stearing sliders. Command syntax is the same that you got from osc. Also very useful is reset values after robot crash/fall. The same way I make robot battery indicator in osc app. Just one more small slider with 0, 25, 50, 75 and 100% marks. esp send actual battery voltage and slider display it value. Sample and useful ?
Find all posts by this user
Quote this message in a reply
08-20-2015, 02:49 PM
Post: #4
RE: ESP8266 , need help
Hello

Juan : nice !
But something is wrong for me, for all the 'Serial1_xxxxx()' I have an error "was not declared in this scope".
I can't find where they are defined ?
I donwnloaded all the new version v2 support from GitHub in my arduino folder (deleted all the folders and files before).
I suspect a librarie problem ...

Sasa :
When you say "write to esp8266 some strings" I understand that you reflash the ESP code with the Arduino-ESP IDE ?
If it is that it's one (or more !) step further than what I able to do now ...
The osc library doesn't support sending message, can you show us how you do this, and the how is new layout for touchosc ?

Patrick
Find all posts by this user
Quote this message in a reply
08-20-2015, 07:35 PM (This post was last modified: 08-22-2015 01:06 AM by sasa999.)
Post: #5
RE: ESP8266 , need help
(08-20-2015 02:49 PM)Pat78 Wrote:  ...
Sasa :
When you say "write to esp8266 some strings" I understand that you reflash the ESP code with the Arduino-ESP IDE ?
YES

The osc library doesn't support sending message, can you show us how you do this, -
#include <OSCMessage.h>
https://www.google.lv/?gws_rd=cr,ssl&ei=...ge+arduino

and the how is new layout for touchosc ?

[Image: Screenshot_1.png]

there is also background change to red when battery level is below 10% - aprox 10.7V

[Image: Screenshot_2.png]

..this is not latest - I found simpler way for robot control without STOP button . Just little sketch changes and robot stop when you lift your finger from OSC slider. Will ttest at weekend Smile
Find all posts by this user
Quote this message in a reply
08-23-2015, 01:39 AM
Post: #6
RE: ESP8266 , need help
I also cant get the new code to compile.
Same issue with compiler errors. Despite all libraries being installed I get the same serial1_not declared in this scope as well as all serial1_ inherited errors
Find all posts by this user
Quote this message in a reply
08-23-2015, 08:34 PM
Post: #7
RE: ESP8266 , need help
Hi Paulnea,
Could you send an screen capture of this error? Or/and copy the error text from the IDE?
What Arduino IDE are you using? We are using the version 1.6.4 without issues.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-23-2015, 09:24 PM
Post: #8
RE: ESP8266 , need help
Hello Sasa

Nice news features ...

Hello Juan Pedro

Could you tell us where is supposed to be located the source code of the Serial1_xxx() functions ? May be it could help to find the answer.


My answers to the questions you ask to Paulnea :
I used 1.6.3 version of IDE an upgraded to 1.6.4, same issue

The error text from the IDE 1.6.3 :

BROBOT.ino: In function 'int ESPwait(String, int)':
BROBOT.ino:478:27: error: 'Serial1_available' was not declared in this scope
BROBOT.ino:479:24: error: 'Serial1_read' was not declared in this scope
BROBOT.ino:485:23: error: 'Serial1_flush' was not declared in this scope
BROBOT.ino: In function 'int ESPgetMac()':
BROBOT.ino:509:27: error: 'Serial1_available' was not declared in this scope
BROBOT.ino:511:25: error: 'Serial1_read' was not declared in this scope
BROBOT.ino:531:27: error: 'Serial1_flush' was not declared in this scope
BROBOT.ino:539:17: error: 'Serial1_flush' was not declared in this scope
BROBOT.ino: In function 'int ESPsendCommand(char*, String, int)':
BROBOT.ino:545:26: error: 'Serial1_println' was not declared in this scope
BROBOT.ino: In function 'void setup()':
BROBOT.ino:621:17: error: 'Serial1_flush' was not declared in this scope
BROBOT.ino:625:34: error: 'Serial1_println' was not declared in this scope
Erreur lors de la compilation.

The error text from the IDE 1.6.4 :
BROBOT.ino: In function 'int ESPwait(String, int)':
BROBOT:478: error: 'Serial1_available' was not declared in this scope
BROBOT:479: error: 'Serial1_read' was not declared in this scope
BROBOT:485: error: 'Serial1_flush' was not declared in this scope
BROBOT.ino: In function 'int ESPgetMac()':
BROBOT:509: error: 'Serial1_available' was not declared in this scope
BROBOT:511: error: 'Serial1_read' was not declared in this scope
BROBOT:531: error: 'Serial1_flush' was not declared in this scope
BROBOT:539: error: 'Serial1_flush' was not declared in this scope
BROBOT.ino: In function 'int ESPsendCommand(char*, String, int)':
BROBOT:545: error: 'Serial1_println' was not declared in this scope
BROBOT.ino: In function 'void setup()':
BROBOT:621: error: 'Serial1_flush' was not declared in this scope
BROBOT:625: error: 'Serial1_println' was not declared in this scope
'Serial1_available' was not declared in this scope

Patrick
Find all posts by this user
Quote this message in a reply
08-24-2015, 05:23 AM (This post was last modified: 08-24-2015 05:31 AM by Paulnea.)
Post: #9
RE: ESP8266 , need help
(08-23-2015 08:34 PM)jpedroc Wrote:  Hi Paulnea,
Could you send an screen capture of this error? Or/and copy the error text from the IDE?
What Arduino IDE are you using? We are using the version 1.6.4 without issues.



Here is what you asked for. I attempted to get the error code with- "show verbose during compile checked" so you could see the library paths are correct but it would hang everytime. I dont Know whats going on but I do know removing (or commenting out) the functions "EspGetMAC", "EspWait", and any associated code with them the sketch will compile. As you can see I am using the same version 1.6.4. I do appreciate any help.

(08-24-2015 05:23 AM)Paulnea Wrote:  
(08-23-2015 08:34 PM)jpedroc Wrote:  Hi Paulnea,
Could you send an screen capture of this error? Or/and copy the error text from the IDE?
What Arduino IDE are you using? We are using the version 1.6.4 without issues.



Here is what you asked for. I attempted to get the error code with- "show verbose during compile checked" so you could see the library paths are correct but it would hang everytime. I dont Know whats going on but I do know removing (or commenting out) the functions "EspGetMAC", "EspWait", and any associated code with them the sketch will compile. As you can see I am using the same version 1.6.4. I do appreciate any help.

Well here is a screenshot with verbose. Although you can see it is froze, it was after accessing the libraries in question which I scrolled up to for the screenshot.


Attached File(s) Thumbnail(s)
       

.txt  error message.txt (Size: 1.1 KB / Downloads: 5)
Find all posts by this user
Quote this message in a reply
08-24-2015, 08:53 AM
Post: #10
RE: ESP8266 , need help
I will take a look in depth in few hours...

Jose.

(08-24-2015 05:23 AM)Paulnea Wrote:  
(08-23-2015 08:34 PM)jpedroc Wrote:  Hi Paulnea,
Could you send an screen capture of this error? Or/and copy the error text from the IDE?
What Arduino IDE are you using? We are using the version 1.6.4 without issues.



Here is what you asked for. I attempted to get the error code with- "show verbose during compile checked" so you could see the library paths are correct but it would hang everytime. I dont Know whats going on but I do know removing (or commenting out) the functions "EspGetMAC", "EspWait", and any associated code with them the sketch will compile. As you can see I am using the same version 1.6.4. I do appreciate any help.

(08-24-2015 05:23 AM)Paulnea Wrote:  
(08-23-2015 08:34 PM)jpedroc Wrote:  Hi Paulnea,
Could you send an screen capture of this error? Or/and copy the error text from the IDE?
What Arduino IDE are you using? We are using the version 1.6.4 without issues.



Here is what you asked for. I attempted to get the error code with- "show verbose during compile checked" so you could see the library paths are correct but it would hang everytime. I dont Know whats going on but I do know removing (or commenting out) the functions "EspGetMAC", "EspWait", and any associated code with them the sketch will compile. As you can see I am using the same version 1.6.4. I do appreciate any help.

Well here is a screenshot with verbose. Although you can see it is froze, it was after accessing the libraries in question which I scrolled up to for the screenshot.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)