Go Down

Topic: Mega + WiFi R3 ATmega2560 + ESP8266 (8 Mb mémoire) (Read 2737 times) previous topic - next topic

serge28

Hello every one

I would like know if some one has some information to share about this " Mega + WiFi R3 ATmega2560 + ESP8266 (8 Mb mémoire)

Thank you

OtonashiRyuugen

#1
Mar 27, 2017, 03:39 am Last Edit: Mar 27, 2017, 04:01 am by OtonashiRyuugen
Please try and put some research into it yourself before asking others about it, it took me two seconds of googling when i first was looking into getting mine to find the page.

The board is exactly as it says, an ATmega2560 with a ESP8266 on a form factor of a Mega breakout.

Are there good instructions out there? No, they are in russian and arnt very helpful, but allow you to set it up.

Are you going to need to play around to get it working? Yes.

Have I got it working yet? not quite how i want it but im still impressed with it.

would i suggest it? Yes.

Just please do a bit of research first before saying basically saying "i cant be bothered to do it, someone hand me the answers"

http://robotdyn.ru/catalog/boards/kontroller_arduino_mega_revizii_r3_s_integrirovannym_chipom_wifi_esp8266_b_8_mb_pamyati/

jilvir

Yes I have... to use it do the following steps

1. Set the dip switch to "special" mode: (1=on, 2=on, 3=on, 4=on, 5=off, 6=off, 7=off, 8=off) see the the description of the product. ( http://www.ebay.com/itm/Mega-WiFi-R3-ATmega2560-ESP8266-USB-TTL-Arduino-Mega-NodeMCU-WeMos-ESP8266-/222305385421)

2. Set the switch in RXD3
3. Run the below sketch, change the SSID and PASSWORD values. this is just to test that Arduino and ESP8266 are working together. The code originated from BISSA ORBOEA in Element14.

#include "ESP8266.h"
 
#define SSID        "YOURSID"
#define PASSWORD    "YOURPASSWORD"
 
ESP8266 wifi(Serial3,115200);
 
void setup() {
 
 
  Serial.begin(9600);             
 
  Serial.println("Restart");
  wifi.restart();
  delay(1000);
 
  Serial.println("FW Version:");
  Serial.println(wifi.getVersion().c_str());
 
    if (wifi.setOprToStation()) {
        Serial.println("OprToStation ok");    }
        else {
        Serial.println("OprToStation  err");
    }
 
    if (wifi.joinAP(SSID, PASSWORD)) {
        Serial.println("Join AP success");
 
        Serial.print("IP:");
        Serial.println( wifi.getLocalIP().c_str());     
    } else {
        Serial.println("Join AP failure");
    }
}
 

void loop()
{
}


I hope this help...
regards...

Awesomo

I have the same board and I tried all the solutions I could find but I am still unable to communicate with the esp8266 module. Every code I tried gave me error messages. The module seems to work though cause it creates it´s own wifi network when the arduino is running.
Please help me.  :'(

albertoG1

I have the same problem, impossible to conect
what card select?

rcosta

I have the same problem. I think that my board is defective.

When I set the DIPs for Mega 2560 it's ok fine. But when set to use ESP8266 and using serial monitor alway the board send some dirt. I try changing the serial speed, but occurs the same.

It's can only be defective. I think.

Regarding to code above, the arduino IDE don't have that library. There are some others associated with 8266, except that.

Someone have some idea?

Thanks.

rcosta

Hi Guys,

I solve the problem. First you need to write the code for each board according your application, but in your code you need to establish a commmincation between serial port of Atmega and ESP in both code, again in according you application. Finally, put the switches which make the intenal interconnection between both.

For example, I made a code for ESP to connect in an Access Point and put on a TCP server. When a wireless client is connected in ESP and consequently in the TCP Server, all data send by client I redirect to the serial port. As serial port of ESP is connected with serial 3 of the Atmega, the code in Atmega pass to theat the data from serial 3.

It's all!

Cheers!

Kimleng

Jilvir@

Before you upload the sketch which board did you choose? When I choose the Atmega2560 board error come up.

isotopa

For upload the sketch to the board:
5, 6, 7 ON
RXD3 - TXD3
 
For run the sketch:
5 and 6 ON
RXD3 - TXD3
 
It works

 :o

isotopa

here a good manual. it solve any doubt

http://www.sysengineering.ru/blog/%D1%8D%D0%BB%D0%B5%D0%BA%D1%82%D1%80%D0%BE%D0%BD%D0%B8%D0%BA%D0%B0-%D0%BA%D0%BE%D0%BD%D1%82%D1%80%D0%BE%D0%BB%D0%BB%D0%B5%D1%80-arduino-mega-%D1%81-esp8266/

Kimleng

isotopa@ thank you very much for your sharing, I also have the exactly the same of your board, and I have try many time with that board. when I try  with Mega alone it works fine, and also alone with Esp works fine. But I found that I cannot use the AT Command to the esp even I already updated new firmware... that is the problem of esp? In my case for my project... I just want to send the sensors data such Temperature or Humidity from Mega pins to the Firebase via built-in Esp8266 on board. I want to start esp from mega by the AT Command via the Serial ports, but I found esp seem doesn't works with AT Command. Now my project still stuck at all. 

Question 1: Do you think, Is it possible to start ESP from Mega via the Serial ports by AT Commands?
Question 2: Do we have to program to both of that , esp and mega?
Question 3: Which board did you select when upload the sketch? "Generic ESP8266 Modules" or "Mega2560"?

I hope you catch what I mean, and happy to provide more information if needed, Thank you again for sharing.

Kimleng

After I try many week, now it works. Follow this if you have the same to my cases:
1. programm to the ESP(upload sketch) for wifi connection by configure the DIP to 5:on,6:on,7:on and other off.
2. program to mega(upload sketch) in case you want to send communication to each other by configure Dip to 3:on,4:on, and other off.
3. switch two  RX0/TX0(in my case I use Serial.print() and Serial.readString() for communicate between Esp and Mega)
4. after you already upload sketch to both Modules you can test communication between them by configure DIP to: 1:on,2:on,3:on,4:on. and then press Reset Button to restart the boards.

5. In ESP you can get the string from Mega by  if(Serial.available()) Serial.readString();  and In mega you can get data from ESP by : if(Serial.available())Serial.readString(). 
6. After you got a string so you can split or do anything whatever you want.
7. If you want send data to Firebase you must use the Firebase Library at the Esp side, in Mega it not support.

*** This work for me, I hope it can help you. Good luck.

nichtraucher

In my case
Send from Mega
Serial.println('some text');
ESP read
if(Serial.available()) Serial.readString();

Send From ESP
Serial.println('some text');
Mega read
if(Serial3.available()) Serial3.readString();

But

receive on ESP from Mega works only when RXD0 - TXD0, Mega does not receive in this case

receive on Mega from ESP works only when RXD3 - TXD3, ESP does not receive in this case

It is possible at the same time to make connection from mega to esp and from esp to mega?

Go Up