MicroPython and ESP8266 Airboat
Water Python
An airboat project uses a standalone WiFi web server for remote control.
My daughters and I have built a number of airboat projects, but this time I thought that I'd use MicroPython [1], a lean and efficient implementation of the Python 3 programming language that includes a small subset of the Python standard library and is optimized to run on microcontrollers.
For this project, my goal was to create a MicroPython standalone WiFi access point and use it as a small web server for controlling the airboat fans.
Hardware
The hardware for this project included:
- 1 ESP8266 module (WiFi microchip)
- 2 L9110 fans
- 1 Arduino Uno proto shield (or use a small breadboard)
- 9V battery or portable phone charger
- K'Nex blocks
- 1 small plastic box
- 2 plastic water bottles
- Duct tape
MicroPython is supported on a number of WiFi-enabled ESP32 and ESP8266 modules. These modules are well priced, with the NodeMCU module starting around $5. Most of the ESP8266 modules also support Lua and Arduino C/C++ programming.
For this project, I used a WeMos ESP8266 module, which comes in a Arduino Uno form factor (Figure 1). I like the WeMos modules, because I can use my Uno proto shields. Also, these modules support 5V DC, as opposed to the typical MicroPython modules, which only support 3.3V. The fans will work with 3.3V, but they generate a lot more wind power at 5V.
The L9110 fans (Figure 2) designed for Arduino projects only cost about $5. They have four pins: VCC, GND, INA (direction), and INB (on/off). For this project, I only used forward-spinning fans, so I only needed to use the INB pin.
Boat Construction
For the boat frame, I used K'Nex pieces because they are lightweight and sturdy (Figure 3); however, other construction kits could be used, as well. Water bottles provided flotation, and duct tape secured the bottles to the frame. To help protect the electronics, I used a small plastic snack container. The fans were wire-wrapped to the boat frame.
MicroPython Setup
Among the available MicroPython development environments, the uPyCraft IDE [2] that I used for this project is well-integrated (Figure 4) and has some excellent tutorials to help you get started.
Typically for MicroPython projects, you create two applications: boot.py
and main.py
. I like to equate this arrangement to Arduino, which has a setup()
function (boot.py
in Python) and a loop()
function (main.py
in Python). For this example, I wanted to keep the documentation simple, so I put everything in the boot.py
file; however, a main.py
file is recommended for larger projects.
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Wine 10 Includes Plenty to Excite Users
With its latest release, Wine has the usual crop of bug fixes and improvements, along with some exciting new features.
-
Linux Kernel 6.13 Offers Improvements for AMD/Apple Users
The latest Linux kernel is now available, and it includes plenty of improvements, especially for those who use AMD or Apple-based systems.
-
Gnome 48 Debuts New Audio Player
To date, the audio player found within the Gnome desktop has been meh at best, but with the upcoming release that all changes.
-
Plasma 6.3 Ready for Public Beta Testing
Plasma 6.3 will ship with KDE Gear 24.12.1 and KDE Frameworks 6.10, along with some new and exciting features.
-
Budgie 10.10 Scheduled for Q1 2025 with a Surprising Desktop Update
If Budgie is your desktop environment of choice, 2025 is going to be a great year for you.
-
Firefox 134 Offers Improvements for Linux Version
Fans of Linux and Firefox rejoice, as there's a new version available that includes some handy updates.
-
Serpent OS Arrives with a New Alpha Release
After months of silence, Ikey Doherty has released a new alpha for his Serpent OS.
-
HashiCorp Cofounder Unveils Ghostty, a Linux Terminal App
Ghostty is a new Linux terminal app that's fast, feature-rich, and offers a platform-native GUI while remaining cross-platform.
-
Fedora Asahi Remix 41 Available for Apple Silicon
If you have an Apple Silicon Mac and you're hoping to install Fedora, you're in luck because the latest release supports the M1 and M2 chips.
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.