Pycom is a young company producing small modules supporting multiple network topologies. Partly funded through a few Kickstarter campaigns they are now up and running. The goal of their products is to enable easy access to the Internet of Things (IoT). To achieve this goal they have crammed as much wireless network technology as possible into a few small modules and made them programmable with MicroPython.

Boards

All the modules are pin-compatible and based on the ESP32 powerhouse from Shanghai-based Espressif Systems. Currently there are three modules: Announced are:
  • 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 & FiPy

In 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 firmware

Furthermore, 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:
import os
os.uname().release
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.

Play in the REPL with WiPy

Now 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)


Accessing the WiPy/LoPy/SiPy/GPy/FiPy system

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.

Currently there are two ways of accessing the file system:
  1. Download and install the Atom text editor (https://atom.io/) and add the Pymakr plugin to it
  2. Use an FTP client
The Pycom website isn’t very clear about this (at the time of writing this article, Pycom has promised to improve this), but before you can access a board’s file system you must first establish a Wi-Fi connection with it. The board advertises itself as ‘wipy-wlan-xxxx’ or ‘sipy-wlan-xxxx’ or something similar where ‘xxxx’ are four hexadecimal digits. The password for all these networks is ‘www.pycom.io’. On Windows 10 I had to uncheck ‘Connect automatically’ before it would let me connect to the board. Once connected you can FTP into the board’s file system at IP address 192.168.4.1 using your favourite FTP client (I use Total Commander, the — by far — best tool for Windows ever written).



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.