-->
Page 1 of 4

ESP v Arduino?

PostPosted: Sun Jan 03, 2016 1:55 pm
by Electroguard
How well does an ESP running Arduino compare to an Arduino running Arduino?

For instance, assuming a sketch that could run on either an ESP or Arduino without using any special features...

1. Would that sketch run faster and better on the ESP or the Arduino?
2. Which would provide more usable memory between say a 4Mb ESP-12D and a Nano?
3. Could an ESPs wifi and wifi interupts be disabled completely to give total unhindered program control of interupts?
4. Are there any other important factors which favour one over the other?

Re: ESP v Arduino?

PostPosted: Sun Jan 03, 2016 2:19 pm
by martinayotte
For speed, folks (including me) on STM32duino forum did some dhrystone benchmarks last spring : http://www.stm32duino.com/viewtopic.php?t=76
The conclusion for ESP was "VAX MIPS rating = 52.57" compared to "VAX MIPS rating = 7.23" for an ATmega2560 16MHz. According to @monsonite, there's not enough RAM on an ATmega328P to try it out.
So, let says that ESP is probably 10 times faster than ATmega328.

For memory, although programs in ESP take much more space, mainly due to SDK itself, but it is far from the limited 32K of the ATmega328.

Interrupts ? Up to a certain level, Yes ! I've never try myself to turn off WiFi, but there is an API for that.

Re: ESP v Arduino?

PostPosted: Sun Jan 03, 2016 3:35 pm
by Electroguard
Thanks Martin, I really value your huge experience.

So am I right in thinking that if I wanted a 'dual core' Arduino-compatable intelligent controller with an ESP handling the comms and other non-time critical tasks, but another processor to do the main IO processing and control, I would actually be better off using another ESP rather rather than an Arduino?

Re: ESP v Arduino?

PostPosted: Sun Jan 03, 2016 4:38 pm
by martinayotte
I think it doable, although I've never did it myself.
Of course, if you need some hardware that is provided by an ESP, you can still look at external peripheral, or going to an STM32 MCU ;-)

Beware also that ESP I2C library is Master only, at least for now, so links between the 2 ESPs should be either Serial or SPI, but it is maybe only question of time if someone is working on an I2C Slave library.

BTW, I found on this site http://www.ecrostech.com/Other/Resources/Dhrystone.htm that ATMega64 provides "VAX MIPS rating = 4.83", so, I was pretty near in my above reply.