Esp8266 your WiFi Embedded solution
Arduino is a great hardware for a lot of reason: easy to use, difficulto to break, it is a very solid 5-Volt board.
But it a way too much and it has a very limited amount of RAM. So I started exploring other more "different" solutions. I need an economy chip with some RAM on it. After some research, I stumpled upon a lot of so-called Arduino alternative...
- STM 32 Good price but less support
- Teensy Very like an Arduino nano, but seems priced a bit too much. Anyway a strong solution in its respect.
- Particle Photon Priced above Arduino, does not seem particular interesting right now.
- PyBoard Priced above an Arduino (34€) and based on the STM32F405RGT6. PyBoard has 192KB of RAM, but seems a bit too priced.
- Beagle Bone Priced above a RaspberryPi3, so a no-way in my humble opinion.
The ESP8266 (ESP-12E spec) has a 4MB Flash RAM, about 96KB of RAM (but some reserved). Uf you put MicroPython on board, you can get very interesting stuff on it (If you remind the BBC Microbit has only 16KB of RAM for running MicroPython, you can understand why esp8266 is an interesting chip)
The only drawback is you have only one analog pin, so be careful if your project need them!
Also you can easily overclock it to 160 Mhz to push its boundaries.
You can also find some "clones" at less then 10 euros on Amazon, anyway I suggest this more "safe" version:
After some rambling I go to this Micro Python tutorial https://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/intro.html to flash micropython on the newcomer.
Flashing Micropython on Windows
- Download your firmware at http://micropython.org/download#esp8266
- Install Python 3
- Install esptool with pip3.
pip3 install esptool
- Under Windows the device is mapped to a COM port like COM1, COM2 etc (a old fashioned ms-dos style port :) To find out the correct COM port, I opened my windooze "Hardware" and looked under Ports (COM & LPT).
- After finding out your COM port, you can flash the last version of micropython with commands like
esptool.py --port COM4 erase_flash # NodeMCU specific command esptool.py --port COM4 --baud 460800 write_flash --flash_size=detect -fm dio 0 esp8266-20170108-v1.8.7.bin
Pins
Power
Our little ESP8266 can be powered via the VIN pin. which support variable voltage up to 20Volt.
For more power examples take a look at http://henrysbench.capnfatz.com/henrys-bench/arduino-projects-tips-and-more/powering-the-esp-12e-nodemcu-development-board/
Also, lets fork micropython if you want to hack a bit it, like uasincio add on support