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.
Esp8266 as "simple" Arduino ?
Re: Esp8266 as "simple" Arduino ?
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.
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.
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)
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.