BoardsAll the modules are pin-compatible and based on the ESP32 powerhouse from Shanghai-based Espressif Systems. Currently there are three modules:
- GPy – Wi-Fi, Bluetooth, LTE CAT M1/NB1
- FiPy – Wi-Fi, Bluetooth, LoRa, Sigfox and dual LTE-M (CAT M1 and NBIoT).
Expansion boards for WiPy, LoPy, SiPy, GPy & FiPyIn what follows I used the modules on an Expansion board that provide a USB serial port. You can do without an Expansion board if you have a serial-to-USB converter.
Update the firmwareFurthermore, always make sure you are using the most recent firmware. Use the Pycom Firmware Update tool for this. You will need to short pin G23 to GND and reset the board to enter firmware update mode.
Open a serial terminal (Tera Term for instance, 115200n81) and press the board's tiny reset button. A list of cryptic messages will appear that ends with a MicroPython prompt (‘>>>’). At the prompt enter the following two lines to check that you have the latest firmware:
The answer I got was ‘1.6.13.b1’ and that looked a lot like the version number I saw during the update process but forgot to write down.
import os os.uname().release
Play in the REPL with WiPyNow it is possible to enter Python commands in the terminal, the REPL, and play a little with the on-board WS2812 RGB LED:
import time import pycom pycom.heartbeat(False) r = 0 g = 0 b = 0 pycom.rgbled(0) while True: if r<255: r = r + 1 elif g<255: g = g + 1 elif b<255: b = b + 1 else: break pycom.rgbled((r<<16)+(g<<8)+b) time.sleep(0.01) pycom.rgbled(0)
Nice, but the goal is, of course, to execute real programs not needing the REPL. For this you need access to the file system so that you can modify the files boot.py and main.py (see also our pyboard & MicroPython review) and add your own files. Unfortunately, this is a bit complicated as the board is only seen as a serial port and not as an external disk.
Accessing the WiPy/LoPy/SiPy/GPy/FiPy system
Currently there are two ways of accessing the file system:
- Download and install the Atom text editor (https://atom.io/) and add the Pymakr plugin to it
- Use an FTP client
If you would like to try out Atom, you may now have a problem, because if (like me) all you have is one network connection on your PC, you are no longer connected to the Internet. So, disconnect from the wi/si/lo py board, connect to the Internet, and download and install Atom. When done, click ‘Install a Package’ in the ‘Welcome Guide’. Type ‘Pymakr’ in the search box, press Enter and wait until the list is populated. Scroll through the list until you find Pymakr and click the ‘Install’ button. When the Pycom console opens and the message ‘Connection error: Error: Login timed out’ appears the plugin is ready. Reconnect to the board’s Wi-Fi network to get the (Micro)Python prompt in Atom’s console. You may have to close Atom and restart it, maybe even wait a few minutes (I had to do this), before this works.