Help adding an ESP 8266 to my Arduino project

Hello, recently i created a topic about a project i am doing and some people recommended me to use the ESP 8266 Wifi module as my wireless solution. Even though i am self taught c programmer i am having problems with the hardware part. So...

I want my Arduino to use this module to receive the IDE C programs i designed through the wireless module. Instead of uploading the program via usb the robot has a power source and i want to to be able to upload anything from the Desktop IDE to the Arduino using this module.

Any youtube video, tutorial page or forum topic for dummies that you know of, it will be great. If it includes the programming part too better so i know how it works before programming it myself. I just want something for dummies that explains everything.

what Arduino? what esp8266 module? you want only OTA upload? you can use esp-link firmware

Arduino uno and i have a mega but i think it doesn't matter for i want. I just want to upload my code from the IDE to the arduino wireless. The Esp 8266 is the Esp-01.

And i need something more detailed than use this firmware :S Any for dummies tutorial just to add wireless to an arduino to upload sketches will be great.

I don't think you can wireless upload sketches to the Arduino using a ESP-01.

I would like to be proven wrong.

ieee488:
I don't think you can wireless upload sketches to the Arduino using a ESP-01.

I would like to be proven wrong.

many solutions over Serial and SPI. (of course SPI not with 01)
it was the first purpose of the esp8266 in the Arduino world. for example see the firmware I linked

randomgirl98:
And i need something more detailed than use this firmware :S Any for dummies tutorial just to add wireless to an arduino to upload sketches will be great.

the esp-link has a complete documentation about wiring, flashing, using

How to flash an Arduino Uno using an ESP8266, esp-link, and avrdude.

Depending on your project you may be even better off by replacing the whole Arduino by an ESP8266 based board, like the NodeMCU or WeMOS mini.

wvmarle:
Depending on your project you may be even better off by replacing the whole Arduino by an ESP8266 based board, like the NodeMCU or WeMOS mini.

replacing Mega in a robot with esp8266 when the robot doesn't need network connection only OTA sketch upload?

OP never mentions it's a robot, OP doesn't even mention anything about the project itself. OP mentioned a Mega and an Uno. Don't know which one this is about.

Nevertheless, even if it's a robot it can probably benefit from the 5x higher clock speed, the 32-bit vs 8-bit processing, and the 4 MB flash and 80 kB RAM the ESP offers as well.

An ESP8266 is a lot more than a WiFi chip. It's a very capable microprocessor in it's own right. The main limitation vs the Arduino Mega is the limited number of pins on board, so you much sooner will need to work with pin expanders.

The ESP modules is to be able to use a remote control connected to the laptop at a long distance. For now i just want to be able to to upload sketches wireless. So the esp 01 wont allow me to do that?

@wvmarle , yes i mentioned it and i have a thread about it. But i dont want that thread to influence this one.

@wvmarle , yes i mentioned it and i have a thread about it. But i dont want that thread to influence this one.

So now you know why we want all info about a project in a single thread.

I don't think I read that thread, so didn't know this, and as a result you got useless advice. That's a waste of time. It's the same project, so of course things WILL influence one another.

wvmarle:
So now you know why we want all info about a project in a single thread.

I don't think I read that thread, so didn't know this, and as a result you got useless advice. That's a waste of time. It's the same project, so of course things WILL influence one another.

No no, still i just want to know how to upload sketches onto the arduino forget about the project.

The main question is, lets assume i only have the esp 8266 esp 01 and an Arduino. What do i have to upload an sketch to the Arduino using wireless.

randomgirl98:
What do i have to upload an sketch to the Arduino using wireless.

What makes you think you can?

I have not anything that said this was possible.

I tested 4 ways of OTA upload of Atmega sketch hex using esp8266. Two of them use SPI connection so they are not for the ESP-01. SPI connection can be used with esp8266 breakout boards (like Wemos D1 mini) or with boards with both MCUs on board connected with SPI (like the new board called 'red'). For now there is no esp8266 SPI connected Arduino shield.

For the serial connection of esp8266 I know the esp-link firmware and the dfu library used in WiFiLink firmware. The esp-link firmware has good docs but the corresponding Atmega library doesn't support general networking (Client and Server implementation).

I use and maintain a copy of WiFiLink. The firmware supports OTA upload of the Atmega 328p (with Optiboot) sketch hex and the library for Atmega sketch supports general networking like the Ethernet or WiFi library. The SPI connection is supported by WFi Link and the dfu library too but it is complicated.

The simplest Atmega sketch OTA upload with esp8266 is the ESP8266AVRISP. It requires SPI and reset connection of MCUs. It can be added to any esp8266 sketch with esp8266 Arduino core. And I added it to Jiri Bilek's WiFiSpiESP firmware which supports a general networking library for SPI connected MCUs.


You can create esp8266 sketches with esp8266 Arduino core.

Juraj:
I tested 4 ways of OTA upload of Atmega sketch hex using esp8266. Two of them use SPI connection so they are not for the ESP-01. SPI connection can be used with esp8266 breakout boards (like Wemos D1 mini) or with boards with both MCUs on board connected with SPI (like the new board called 'red'). For now there is no esp8266 SPI connected Arduino shield.

For the serial connection of esp8266 I know the esp-link firmware and the dfu library used in WiFiLink firmware. The esp-link firmware has good docs but the corresponding Atmega library doesn't support general networking (Client and Server implementation).

I use and maintain a copy of WiFiLink. The firmware supports OTA upload of the Atmega 328p (with Optiboot) sketch hex and the library for Atmega sketch supports general networking like the Ethernet or WiFi library. The SPI connection is supported by WFi Link and the dfu library too but it is complicated.

The simplest Atmega sketch OTA upload with esp8266 is the ESP8266AVRISP. I requires SPI and reset connection of MCUs. It can be added to any esp8266 sketch with esp8266 Arduino core. And I added it to Jiri Bilek's WiFiSpiESP firmware which supports a general networking library for SPI connected MCUs.


You can create esp8266 sketches with esp8266 Arduino core.

So what does all of that mean?

Which specific partd does one need to buy to upload a sketch to an Arduino Uno?

I need a Dummies 101 version.

Get a proper ESP module, not the severely crippled ESP-01. Almost any will do.

Easiest, though, is to get a development board such as the WeMOS mini or NodeMCU. Those have all pins broken out, built in voltage regulator, etc.

You will however need level shifters on the SPI lines between the ESP and the Arduino, as the ESP runs at 3.3V and most Arduinos on 5V. Communication from ESP to AVR (MOSI, RESET) should be fine on 3.3V; the return (MISO) not as it's driven to 5V and that is too much for the ESP.

ieee488:
So what does all of that mean?
Which specific partd does one need to buy to upload a sketch to an Arduino Uno?
I need a Dummies 101 version.

SPI or UART? is networking library needed? your esp sketch or firmware for networking library in AVR?

for serial connection, firmware without networking library (or only MQTT) the esp-link is the best. it has good docs.

for serial connection with general networking library the WiFiLink is good, but only for Atmega 328p with Optiboot. This is what I use. I wrote the documentation and I can help troubleshot it.

for serial connection with your esp sketch you could use the dfu library used in WiFi Link.

For SPI connection the ESP8266AVRISP esp library is the best option in your sketch or with WiFiSpiESP firmware. Making SPI connections with jumper cables and level shifter is good only for test setup because SPI requires 4 lines connected with level shifter. Then the reset line, ground, vcc. And optional reset of esp from atmega.

all links are in my previous comment


image of spi connected wemos and nano with mutual reset connection and an extra connection required for WiFi Link

and fritznig for Uno

I want to upload a *.ino file
I want to upload it to the Arduino Uno.

I am thinking that I would use a prototype shield with the Arduino Uno to mount a ESP-05 and the level shifters boards (I have 10 laying around).
Would the ESP-05 work?

ieee488:
I want to upload a *.ino file
I want to upload it to the Arduino Uno in another town.

no problem :slight_smile:

ieee488:
Would the ESP-05 work?

not for SPI connection.