Chat freely about anything...

User avatar
By Inq720
#94032 Elevator Version - Why do you use an Arduino (real one or clone) in the same project with an ESP8266 / ESP32?

Long Winded Version - (That's called Inq'ing it) :lol:
I kind of feel sorry for the people that created the Arduino. They rocked the world. They created this industry. IoT wouldn't exist without Arduino. I was around before Arduino and it was horrendously expensive and complex to connect say... your desktop computer to Things.
But... they rested on their laurels too long (like IBM). And as China INC is want to do, they will clone you to death. But, sometimes they create something truly inspirational - ESP8266.

I remember when Espressif released it. It was like sipping the ocean through a straw - trying to talk to the world through its AT command set. Then some brilliant, next-level hackers realized they could program it directly. That was a brutal stage for us mere mortals... physically hooking up to it was rough with its non-breadboard-friendly layout and (strange then) 3.3 volts. And the development software layer to program it was like cobbling together a rockets ship using nothing but rocks and sticks.

Then came another brilliant, next-level developer(s) with Igrr, et al https://github.com/igrr leading the way and created the Core ESP8266 that allows us little people to use the Arduino IDE to program it.

On the hardware side, development boards started appearing (WeMos and then NodeMCU) that made all those connectivity headache go away with a simple USB cable to our computers.

There is a rampant amount of information out there that keeps teaching people to use the Arduino with an ESP. Some of it is just old legacy links for those antiquated mid-phases described above. However, the Arduino site https://create.arduino.cc/projecthub/ is filled to the brim with new topics. I suspect most of them are so they can get their project promoted by the Arduino people.
Arduino doesn't make any money unless we buy a real Arduino board. (I'm glad they cleaned out references to the Genuino. All they were doing was confusing new people coming into the field)

In just the last couple of weeks, I counted ten new threads that were using the two units together and were having troubles. No matter how you connect them AT, SPI, I2C, there are just that many more ways to have problems. Especially for a person just getting started.
So... I'm wondering if I'm missing something. Is there a good reason for the mating? My question to you is...
Why do you use an Arduino (real one or clone) in the same project with an ESP8266 / ESP32?
User avatar
By JurajA
#94038 it still valid to use the esp8266 as network adapter (as it was developed for that purpose).
for example I have a project which can use any WiFi or Ethernet which supports the Arduino networking API (Client and UDP class).
or the the host MCU can be more capable for the project than the esp8266.
User avatar
By Inq720
#94041
JurajA wrote:it still valid to use the esp8266 as network adapter (as it was developed for that purpose).
for example I have a project which can use any WiFi or Ethernet which supports the Arduino networking API (Client and UDP class).
or the the host MCU can be more capable for the project than the esp8266.


I understand it is still valid for using as a network adapter. I remember the ESP8266 before it came to the hobbyist community. That Espressif only marketed it as an AT bridge to communicating with WiFi. I know directly of two massive custom mother board projects controlling large, complicated machines that can optionally use an ESP-01 for WiFi purposes.

And that it was not Expressif, but some hobbyist/hacker that could and did dive into the bowls of the nearly indecipherable Espressif documentation and figured how to re-program it directly... the rest is this forum's history.

My question is more about asking if anyone knows of any project that an Arduino + ESP8266 can do, that the ESP8266 can not do alone. Only one case comes to my mind (so far) and that is the Mega 2560 where you actually need the huge number of analog and digital pins. But even that, the MPU part is a mere fraction of the ESP8266's capability. In that case, I'd still use the ESP8266 as the primary and use the Mega 2560 as a giant dumb MUX.

But, more importantly, in the context of this forum. I see this forum as mainly a way of helping beginners through intermediate people with the use of the ESP8266. I've seen your posts in the past and know you are one of the mentors here and certainly have helped me.

99% of the questions here are about those projects that might have one or two sensors. In the last two weeks alone, I've counted at least 6 different threads where someone was having troubles getting the Arduino + ESP8266 combo working. I've tried to help some of these without trying to enlighten them and some I questioned why are you doing this? I don't really get any responses in either case.

I have a box full of various Arduino boards I had before I started using ESP8266s. They just gather dust now instead of data. Although, I can't think of a project that I wouldn't want to use WiFi, if I did, I'd still use an ESP8266. Cheaper, Faster, More Memory.

So the question still stands not whether you can use them together, but where is it an advantage (especially for a beginner to intermediate project)?
User avatar
By JurajA
#94054 so yes. I think the Wemos D1 mini with esp8266 is the best Arduino and I think these years it is the most used Arduino.
if two MCU should be used then I always recommend to use one with stable firmware and develop only one Arduino sketch. that is why I created the WiFiEspAT library.