Hi,
Really struggling to get this board working. I have read so many different posts and tutorials and none of them work and some are also conflicting with others. It's been about 10 hours of frustration and I would really like to ask for help.
I have brought 2 Wemos® Mega +WiFi R3 Module ATmega2560+ESP8266 from Banggood
I do not seem to understand this board and how to make it work as some posts say you have to upload some firmware (somehow) but don't tell you where to get this firmware. Some posts say just set the dip switches and upload a script (which I have tried but does not work)
So, if someone who has one of this boards could take a few mins to explain I would be truly greatful.
So, with the board out of the static bag, what should be my first job at getting this board to work. Say let's get the WiFi working first.
I have in the IDE already done the Additional Boards (http://arduino.esp8266.com/stable/package_esp8266com_index.json) bit and set the board to be Generic ESP8266 Module.
- what position does the dip switches need to be in plus the RX/TX switch position
- Do I need to upload some firmware, if so where from an how on a win10 PC
- Do I need to add an ESP8266 Library (I have tried run a test script but it can not find esp8266.h, so presume a library is needed. I download the GitHub - Hieromon/ESP8266: ESP8266 WiFi module Library for Arduino library but then it complaind "WIFI was not declared in this scope)
The script was
#include "Arduino.h"
#include "ESP8266.h"
#include "SoftwareSerial.h"
SoftwareSerial ConsoleOut(8, 9);
#define SSID "CZGB"
#define PWD "whdhdudt"
void setup() {
char *ipAddress, ap[31];
WiFi.reset(WIFI_RESET_HARD);
WiFi.begin(9600);
if (WiFi.join(SSID, PWD) == WIFI_ERR_OK) {
ipAddress = WiFi.ip(WIFI_MODE_STA);
ConsoleOut.print(F("\n\rIP address:"));
ConsoleOut.print(ipAddress);
ConsoleOut.print(':');
if (WiFi.isConnect(ap))
ConsoleOut.println(ap);
else
ConsoleOut.println(F("not found"));
} else
while (1);
}
void loop() {
if (WiFi.connect((char *)"www.google.co.jp", 80) == WIFI_ERR_CONNECT) {
if (WiFi.send((const uint8_t *)"GET / HTTP/1.1\r\n\r\n") == WIFI_ERR_OK) {
int16_t c;
uint16_t len = WiFi.listen(10000UL);
while (len)
if ((c = WiFi.read()) > 0) {
ConsoleOut.write((char)c);
len--;
}
} else
ConsoleOut.println(F("Send fail"));
WiFi.close();
} else
ConsoleOut.println(F("TCP connect fail"));
WiFi.disconnect();
while (1);
}
If I can get this part completed then I can try and get the connection to the Mega side.
Thanks