Espduino connection

Hi everyone,

I’m adopting a Cactus Micro Rev2 2 board that integrates a ESP8266 wifi card (http://wiki.aprbrother.com/wiki/Cactus_Micro_Rev2). This board is really interesting thanks to its price and features. However, w.r.t. thinger.io platform, the ESP8266 installed onboard adopts the espduino library thus the wifi connection has to be established with the espduino commands (e.g. https://github.com/AprilBrother/espduino/blob/master/examples/thingspeak/thingspeak.ino)

Thinger.io is a wonderful platform and it would be fantastic if we can connect the Cactus Micro R2 to your platform. However, it is not clear to me how to connect them because on the documentation page you require the use of WiFi.h or ESP8266WiFi.h libraries to establish a WiFi connection. Do you have any suggestions for espduino library?

Many thanks

HI,

we are working on this kind of setup, which uses the ESP8266 with AT commands. Checkout this post:

We have to test a new library called TinyGSM that seems to work well for other AT boards like GPRS devices.

Hi @Giuseppe_Desolda! I have updated the library in Github, you can install the new library (2.6.0), and test the ESP8266AT example, that should work with this board. You may need to change the Serial configuration to talk with the ESP8266 module. Let me know if it works for you!

Thank you very much for your support.

I download the library at the link https://github.com/vshymanskyy/TinyGSM and then I added this library to my Arduino IDE

Then I tried to use this sketch https://raw.githubusercontent.com/thinger-io/Arduino-Library/master/examples/ESP8266AT/ESP8266AT.ino but an error appears in the Arduino IDE console, i.e.,

fatal error: TinyWiFiClientESP8266.h: No such file or directory

 #include <TinyWiFiClientESP8266.h>

What I wrong?

You can install the TinyGSM library directly from the Library Manager (this one works for me). Maybe the one that is downloaded from the master branch is a different one. Also try to restart the Arduino IDE to detect the library properly.

You’re right! Now the sketch has been compiled.

However, I uploaded on my Cactus Micro Rev2 the sketch available at the link https://raw.githubusercontent.com/thinger-io/Arduino-Library/master/examples/ESP8266AT/ESP8266AT.ino and in the Serial Monitor (I activated the debug) there is the error

[NETWORK] Cannot connect!
[NETWORK] Starting connection...

P.S. My Cactus Micro adopts the AT firmware; I’m successfully connected to WiFi networks with other sketches (e.g. https://github.com/AprilBrother/cactus-micro-r2/blob/master/libraries/CactusMicro/examples/httpPost/httpPost.ino).

I’ll try to solve it but I hope you have some suggestions.

Seems that the example uses Serial1 by default. Remove the following lines in order to make sure you are using the right serial and not the software one.

// Emulate Serial1 on pins 10/11 if HW is not present (use interrupt pins for better performance)
#ifndef HAVE_HWSERIAL1
#include "SoftwareSerial.h"
SoftwareSerial Serial1(10,11); // RX, TX
#endif

I removed those lines but the problem is the same.

I assume that you changed the SSID also. Your ESP8266 is running at 9600 baud rate? Did you tried with 115200? 57600?

Sure, I modified the SSID and password attributes. I also tried all the baud rates but nothing changed.

In addition, since the ESP8266 is welded on Cactus Micro, to activate the ESP I have to activate the pin number 13 in the setup() method after the Serial1.begin(9600) (see for example https://github.com/AprilBrother/cactus-micro-r2/blob/master/libraries/CactusMicro/examples/httpPost/httpPost.ino)

 pinMode(13, OUTPUT);
 digitalWrite(13, HIGH); 

However nothing changed.