- Sun Aug 23, 2015 1:31 am
#26846
I've had very similar thoughts as the OP. Having done quite some esp8266 programming, I think there are really some hard tradeoffs. Some of the pro esp8266 and cons relative to arduinos (AVRs):
Some general pros are the on-board wireless, the CPU horsepower, the comparatively large amount of flash and RAM.
Some general cons are the limited I/O pins and limited peripherals driving those I/O pins, and then the limited documentation.
Less obvious cons against the esp8266:
- it's running an RTOS and you are really only getting limited CPU time, you have to yield so the Wifi and other shtuff keeps humming, so some dead simple hog-the-cpu AVR loops turn into more code
- you cannot turn off certain non-maskable interrupts that are required by the wifi, so if you need to wait exactly 17us and then sample an I/O pin then 99.9% of the time your sleep_us(17) will do what you expect, but every now and then it may take a lot longer causing difficult to track down errors
- the esp's power budget is a multiple of an AVR's, basically you're looking at ~16mA minimum unless you completely shut down the CPU for a timed period or until a gpio pin transitions
I don't want to sound anti-esp8266, I think there are just some realities that make it that some projects are great just on an esp8266 and others are probably better done using an AVR or ARM + and esp866. I've been developing an esp bridge that connects and attached microcontroller to the esp
https://github.com/jeelabs/esp-link and I'm using that when I do want an AVR or ARM processor.
Hope this helps!