Esp8266 as "simple" Arduino ?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
ioukos
Posts: 34
Joined: Wed Oct 19, 2016 11:31 am
Location: Alsace, Europe

Esp8266 as "simple" Arduino ?

Post by ioukos » Fri May 26, 2017 12:55 pm

Hello,

As i use Esp8266 and micropython for a year and as, for examples, wemos d1 mini are quite cheap, I wonder : is there a way to shutdown wifi with micropython to use esp8266 as an Arduino ?

I know wifi is a great feature, even a killer app in this case. But sometimes I want to build something simple with no wifi.

Any suggestions ?

Ty guys.

User avatar
mcauser
Posts: 507
Joined: Mon Jun 15, 2015 8:03 am

Re: Esp8266 as "simple" Arduino ?

Post by mcauser » Fri May 26, 2017 1:57 pm

There's no issues switching your ESP8266 firmware between MicroPython, Arduino, NodeMCU.
Simply flash the version you want to use.
Be sure to run an erase_flash command on esptool.py to completely remove the previous version.

You can toggle the wifi in all of the firmwares.

Code: Select all

>>> import network
>>> sta_if = network.WLAN(network.STA_IF)
>>> sta_if.active(False)
>>> ap_if = network.WLAN(network.AP_IF)
>>> ap_if.active(False)

Code: Select all

#include <ESP8266WiFi.h>
setup() {
   WiFi.disconnect();
   WiFi.mode(WIFI_OFF);
}

Code: Select all

wifi.setmode(wifi.NULLMODE, true)
An Arduino Pro Mini costs around the same as an ESP8266, and has more IOs and comes in 3.3V and 5V flavours.
If you need even more IOs, have a look into the STM32F103C8T6 "blue pill". Can also be programmed with Arduino IDE.
The STM32F1 series are a bit to light on flash for MicroPython. The STM32F4 series has plenty of flash. eg STM32F407VET6.

Post Reply