Getting an esp8266-01 arduino online

Hi all!
Im trying to connect to blynk/wifi and using an arduino uno w/ wifi for a project. It has an inbuilt esp8266 more specifically, it is the MCU-ATmega328P with ESP8266+8mb flash.

These are my current board settings:

I have used the blynk example following to try get the thing online:

however, there is no response from the serial monitor and nothing happens. The serial monitor is blank and the bottom box says:

I have even tried to make a simplistic line of coding to test the serial monitor and still nothing:
simple code

and yes, I've checked the baud rate of the serial monitor.
Thanks.

Hi @arduinoamateurworks ,
What board do you have exactly? Is it this? https://store.arduino.cc/usa/arduino-uno-wifi-rev2

Sadly no. From what I've been told it may be a knockoff arduino board, however, I've also seen that it should perform similarly to arduino products. It is the UNO+WiFi R3 ATmega328P+ESP8266 CH340
XC4411-uno-with-wi-figallery5-300

Try selecting "Arduino Uno Wifi Rev2" in your board selection.

No good.

"avrdude: usbhid_open(): No device found
avrdude: jtag3_open_common(): Did not find any device matching VID 0x03eb and PID list: 0x2145
An error occurred while uploading the sketch"

Did you try changing the DIP switches? Here is a descriptive page on how to use your board. Robotdyn Uno WiFi R3: ESP8266 communication
Because your board has a Atmega and ESP8266, you need to switch between the two using the DIP switches.
Also try switching your baud rate in your code to 57600baud.

Yes I have changed the dip switches. I isolated the esp8266 by switching switches 5,6,7 ON and the rest OFF. And which code are you referring to? the first or second?

Ok. Either code.

"An interesting observation was that any serial.print message made by the ESP was received by the ATmega328, but the ESP8266 only received data that wsa sent by "printTo(Serial)" and did not receive Serial.println messages."

I don't think the ESP8266 can print to serial. When it prints to "serial", it really sends that to the atmega328.

ohhh is that so? then how can I ensure that my code is functioning? I checked blynk after running the initial code and it was receiving nothing

According to what I have here, with dip pins 5 and 6 ON, I should be able to communicate between computer serial and the ESP8266

Did you add your wifi credentials? Add a led from a usable pin to ground. Maybe try this code:

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

#define ledPin 2

char auth[] = "*****************";
char ssid[] = "**********";
char pass[] = "**********";

void setup(){
pinMode(ledPin, OUTPUT);
Serial.begin(57600);
Blynk.begin(auth, ssid, pass);
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
}
void loop(){
Blynk.run();
}

The LED will light up for 1 second after Blynk connects.

Should I run the esp8266 upload speed to 57600 too or keep it as 115200?

Yes, upload the Blynk sketch again to the ESP8266, and change the baud rate in the code to 57600.

How is the LED supposed to function if I am writing to the esp8266 and the LED is connected into the arduinos second pin? ~ I got the error, "exit status 1
too few arguments to function 'void pinMode(uint8_t, uint8_t)'"

Sorry, I changed the code above. It should work now. I forgot pinMode(ledPin, OUTPUT);, and instead wrote pinMode(ledPin);

ahaha all good. I'm going to try it, then try it at 115200 and see what happens

This chart on the DIP switches might be helpful also:
Screen Shot 2021-07-04 at 9.18.00 AM
I think you want it on USB<-> ESP8266 (communication) after uploading the code using USB<->ESP8266 (Update firmware or sketch) Just try switching DIP 7 to off after uploading the code.

I'll give that a shot. Thanks :slight_smile:

Now I'm getting a new erroe, completely unprovoked 'could not open COM6'

Is you board plugged into your computer all the way? Try going to "Tools -> Ports" and select the correct port.