Jython
Deutsch   English 

8. Installing LinkUp with ESP32 Coprocessor

 

The micro:bit can be extended with a powerful ESP32 microcontroller which has an integrated WLAN system. The ESP32 is connected to the micro:bit via the I2C interface and attached to the Lipo battery with a double-sided adhesive tape. It functions as a I2C slave like an additional sensor and can start an WLAN access point with just a few commands or log on to an existing router and thus access the Internet. This allows the micro:bit to use typical cloud services or even start its own Web server, which is accessible from the Internet.

The ESP runs its own firmware that is completely transparent to the micro:bit programmer who just has to  know a few functions of the module linkup that implements a simple communication protocol.

 

 

Additional hardware components (source of supply: www.bastelgarage.ch)

 

 

WEMOS ESP32 MiniKit

(There are cheaper clones, for example. from Aliexpress MH-ET LIVE D1 mini ESP32)

4-wire connection cable(jumper cable Dupont) or 4 single cables female-female (20 cm)

 

 

Electrolytic capacitor 3300µF/6.3V. Length 20 mm, diameter 10 mm 

 



If you don't have a soldering iron, we recommend a cheap USB soldering iron, like the BT-8U 8W.

 

 

How to proceed:


1.

Cut the cables to the correct length.
The red cable is about 8.5 cm long,
the other cables 1 cm shorter.
(The colours serve as orientation only)


2.

 

 

Strip all cables at the end about 3 mm with a Stanley knife or a stripping tool (do not damage the strands).



3.



Insert the 4 cables into the pins and solder from the back side.

 

 


Wiring diagram:



4.


Apply two small strips of double-sided adhesive tape to the back side.

 

5.

Fasten the ESP32 board oo the Lipo battery, pull the cables around the micro:bit and plug them in the I2C connector. Be careful about the polarity (consult the wiring diagram). 

 

 

 

6.


Shorten the connecting wires of the capacitor and bend them at right angles (solder them to a 2-pin socket, if available)

When plugging in, make sure that the polarity is correct (marked on the capacitor and next to the socket).

 

7.

Installing the firmware:

Connect the ESP to the computer using a USB cable

Windows 10 automatically detects the USB device. No driver installation required

For Windows 7, 8 and Mac, a USB driver must be installed. Download the driver file for MacOS or Windows, unpack it and start the installation with a mouse click.
 


 

You can check if the ESP is detected correctly
- In TigerJython select Enumerate COM ports under Tools (without connecting the  ESP)
- Connect the ESP and display the ports again
- An additional port must appear (remember the port name)

 

In TigerJython select ESP32 under Tools/Devices and enter this port (e.g. COM3)
- Select Flash Target in the Tools menu
- Select ESP32 Loboris
- Wait until the process is completed


8.

Test
Turn on the Maqueen. The red LED on the ESP board lights up immediately. After a short time the blue LED starts flashing (indicating that the LinkUp is in command mode). 

ATTENTION: If the ESP is not in use, it switches off automatically after 5 minutes in order to save power (the blue LED no longer flashes). To reactivate it, press the reset button of the ESP. This is also used to reset the ESP from a blocking Web server state back to command mode.

Test for advanced users:
Connect the micro:bit to the PC and select the device micro:bit/Calliope in TigerJython.  Select Tools | Remote Terminal. The Python prompt appears in the console window. Type: i2c.scan(). The I2C addresses (7-bit, decimal) of all connected devices are displayed. The ESP uses address 119. (The other addresses correspond to I2C devices on the micro:bit and on the Maqueen.)