This project allows you to control your BBC micro:bit via WiFi, by using a cheap ESP-01 (ESP8266) module. The micro:bit would generate an HTML web page for the user with buttons on it. The web page can be accessed from your computer or smartphone by accessing to your browser.
Level of Difficultly: Advance
List of Hardware
- May refer the link here for the code:
- The HTML is pre-created for testing purpose. If you wish to change the outlook of the WebPage, may edit the HTML code in “function getHTML” such as below.
Run the Test
- In AP mode the default IP is 192.168.4.1. Connect your computer or phone to the new WiFi (named as SSID_2 in the code, in default is “ESP8266”) and enter the password (as PASSWORD_2, In Default: microbit). You can rename both and change password if you want.
- Then open web browser and enter 192.168.4.1 and you’ll should see the web page.
- By pressing the button “TURN IT ON” the LED will turn ON.
- Then the page will refresh and rename the button as “TURN IT OFF”.
(1) On Web server button pressed, control 2x LED blinking.
Troubleshooting for ESP8266
- Scenario 1: Wifi module not responding
- Solution: Check the wifi module connection as this module is very sensitive and easily broken when over voltage or short circuit.