Hi i have this board
UNO+WiFi R3 ATmega328P+ESP8266, 32Mb flash, USB-TTL CH340G, Micro-USB
I try to upload the sketch to esp8266 and i get ERR
Someone knows or knows something about this card
Arduino: 1.8.7 (Windows 7), Board: “Generic ESP8266 Module, 80 MHz, Flash, Enabled, ck, 26 MHz, 40MHz, QIO, 512K (no SPIFFS), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200”
Sketch uses 310500 bytes (62%) of program storage space. Maximum is 499696 bytes.
Global variables use 28208 bytes (34%) of dynamic memory, leaving 53712 bytes for local variables. Maximum is 81920 bytes.
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.
Hello, unfortunately I don’t have any instructions for that board, but it should work with all my examples. I recommend starting from the beginning:
- Do you have the right switch sequence (see the switch table in the product page): https://robotdyn.com/uno-wifi-r3-atmega328p-esp8266-32mb-flash-usb-ttl-ch340g-micro-usb.html
Thanks for your patience and let me know if you double-check the switch!
Tanks
I put the switch 5,6,7 to on
and i press the button “Mode”
and try to upload this sketch , its work good in esp8266 12E node,
and still the same ERR
/*********
Rui Santos
Complete project details at https://randomnerdtutorials.com
*********/
// Load Wi-Fi library
#include <ESP8266WiFi.h>
// Replace with your network credentials
const char* ssid = “ESP32-Access-Point”;
const char* password = “123456789”;
// Set web server port number to 80
WiFiServer server(80);
// Variable to store the HTTP request
String header;
// Auxiliar variables to store the current output state
String output26State = “off”;
// Assign output variables to GPIO pins
void setup() {
Serial.begin(115200);
// Initialize the output variables as outputs
// Set outputs to LOW
// Connect to Wi-Fi network with SSID and password
Serial.print(“Setting AP (Access Point)…”);
// Remove the password parameter, if you want the AP (Access Point) to be open
WiFi.softAP(ssid, password);
IPAddress IP = WiFi.softAPIP();
Serial.print(“AP IP address: “);
Serial.println(IP);
server.begin();
}
void loop(){
WiFiClient client = server.available(); // Listen for incoming clients
if (client) { // If a new client connects,
Serial.println(“New Client.”); // print a message out in the serial port
String currentLine = “”; // make a String to hold incoming data from the client
while (client.connected()) { // loop while the client’s connected
if (client.available()) { // if there’s bytes to read from the client,
char c = client.read(); // read a byte, then
Serial.write(c); // print it out the serial monitor
header += c;
if (c == ‘\n’) { // if the byte is a newline character
// if the current line is blank, you got two newline characters in a row.
// that’s the end of the client HTTP request, so send a response:
if (currentLine.length() == 0) {
// HTTP headers always start with a response code (e.g. HTTP/1.1 200 OK)
// and a content-type so the client knows what’s coming, then a blank line:
client.println(“HTTP/1.1 200 OK”);
client.println(“Content-type:text/html”);
client.println(“Connection: close”);
client.println();
// turns the GPIOs on and off
if (header.indexOf(“GET /26/on”) >= 0) {
Serial.println(“GPIO 26 on”);
output26State = “on”;
} else if (header.indexOf(“GET /26/off”) >= 0) {
Serial.println(“GPIO 26 off”);
output26State = “off”;
}
// Display the HTML web page
client.println(“<!DOCTYPE html><html>”);
client.println(“<head><meta name=\”viewport\” content=\”width=device-width, initial-scale=1\”>”);
client.println(“<link rel=\”icon\” href=\”data:,\”>”);
// CSS to style the on/off buttons
// Feel free to change the background-color and font-size attributes to fit your preferences
// Web Page Heading
client.println(“<body><h1>TOYATA ERR </h1>”);
// Display current state, and ON/OFF buttons for GPIO 26
// If the output26State is off, it displays the ON button
if (output26State==”off”) {
client.println(“<p><a href=\”/26/on\”><button class=\”button\”>ON</button></a></p>”);
} else {
client.println(“<p><a href=\”/26/off\”><button class=\”button button2\”>OFF</button></a></p>”);
client.println(“<p>hi esp8266 </p>”);
}
// Display current state, and ON/OFF buttons for GPIO 27
client.println(“</body></html>”);
// The HTTP response ends with another blank line
client.println();
// Break out of the while loop
break;
} else { // if you got a newline, then clear currentLine
currentLine = “”;
}
} else if (c != ‘\r’) { // if you got anything else but a carriage return character,
currentLine += c; // add it to the end of the currentLine
}
}
}
// Clear the header variable
header = “”;
// Close the connection
client.stop();
Serial.println(“Client disconnected.”);
Serial.println(“”);
}
}
That error means that your ESP is not establishing a serial communication with your computer or it’s not in flashing mode:
"warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed"
As I said, I’ve never used that board before, but you need to select the right pins and force the ESP to go into flashing mode. (Note during boot GPIO 0 must be connected to GND, so the ESP is in flashing mode).
You also need to double-check, if you have the right board in Arduino IDE selected and COM port.