BIPES project needed a splash screen, so I adapted the code from a W3C tutorial and added cookies so that the user can click on the select box “Do not show this screen anymore” and a cookie is set. When this cookie is set, the next access to the webpage will not show the splash screen. Simple, but useful 🙂
MicroPython has this great feature: WebREPL. It uses WebSockets to allow interactive Python shell sessions to the device running MicroPython, and also allows files to be uploaded and downloaded – all over the network, so we can easily program, debug and interact with ESP32, ESP8266 and other MicroPython enabled boards over Wifi! CircuitPython still does not have WebREPL, but I am looking forward to it (https://github.com/adafruit/circuitpython/issues/4050)!
However, sometimes is hard to discover which IP is assigned to a specific board, especially if the board is connected to a USB power bank or a power supply and has no display/interface to show the IP. Sometimes I use the the Wifi Access Point configuration page to see the DHCP client list and try to guess which one is leased to the board I am working with.
In that way, we decided to add a “WebREPL device scanner” feature on BIPES. You can use this feature to discover/identify all IP addresses associated with WebREPL ports using WebSocket (on port 8266). The feature is presented as a button next to the Connect button and opens a new page. It is useful even if you don’t use BIPES, but need to find the IP address of a board on the same network your computer is.
It is a quick and simple solution, which can save time and make activities more practical. Hope it helps you!
Just presented a remote hands-on workshop on the 1st International Seminar on Astronomy and Astronautics – MCTI (DAY 5). Recording is available here (https://www.youtube.com/watch?v=Sj8oWiK2N3U). Remote participants were able to use BIPES to remotely program, monitor and control ESP8266 boards to read sensors and print messages to LED Matrix displays and see all happening online using a web camera.
The commands above should fix the issue. Then you can connect to an existing Access Point:
sta_if = network.WLAN(network.STA_IF); sta_if.active(True)