WiPy

Pycom is a Dutch company that produces small electronic boards.

The boards are:
 * Based on the ESP32 SoC, which is fairly powerfull for a small breadboard;
 * Support MicroPython, so it is easy to program with Python;
 * Integration with multiple communication protocols.

Protocols and Products
The protocols supported are:


 * Wifi (I don't know which protocols exactly though)
 * Bluetooth Low Energy (BLE)
 * LoRa
 * Sigfox
 * LTE-M (mobile)

See Domotics for some more information on these protocols.

The products are:

File System
>>> import os >>> os.getcwd '/flash' >>> os.listdir ['main.py', 'sys', 'lib', 'cert', 'boot.py']


 * flash/
 * boot.py
 * main.py
 * sys/
 * lib/
 * cert/

The three folders are empty by default.

After booting, the device executes the Python code in, then the code in.

Documentation
See https://www.pycom.io/support/supportdownloads/ for firmware updates. Now that since version 1.0, the same updater

PyMakr is a useful tool which allows easy execution of Python code on the device, either while connected via the serial console or via SSH over wifi.

Pinout diagrams for both the chip, as well as the expansion board, can be found at the above URL.

https://docs.pycom.io/ provides documentations and tutorials. An older version (for the WiPy 1 only) can also be found at http://docs.micropython.org/en/latest/wipy/.

Useful commands
If machine is bricked, the easiest way is to login with serial console, reset the network to an access point, and login with user micro, password python to the build-in FTP server.

Version
Beside the info in,  , and  ,   give most information. contains the firmware version,  contains the Micropython version.

>>> os.uname (sysname='LoPy', nodename='LoPy', release='1.2.0.b1', version='v1.8.6-290-gdac16bd on 2017-01-05', machine='LoPy with ESP32')

Display a File
Not pretty, but a short way to print the contents of a file:

>>> print (open('boot.py').read)

Serial Connection
The default contents of  is:

import os from machine import UART uart = UART(0, 115200) os.dupterm(uart)
 * 1) Allow serial connections

Wifi
See https://docs.pycom.io/lopy/lopy/tutorial/wlan.html for some examples.

To reset the network to an access point: from network import WLAN wlan = WLAN(mode=WLAN.AP)

Connect to the MacFreek wifi network:

import machine from network import WLAN if machine.reset_cause != machine.SOFT_RESET: wlan = WLAN(mode=WLAN.STA) wlan.connect('MacFreek', auth=(WLAN.WPA2, 'my_password_'), timeout=5000) while not wlan.isconnected: machine.idle # save power while waiting print("Connected to MacFreek network") print(wlan.ifconfig) else: print("soft reset")
 * 1) connect to wifi
 * 2) see https://docs.pycom.io/lopy/lopy/tutorial/wlan.html

The Blinking Lights
import pycom pycom.heartbeat(False) # disable the heartbeat (blue flashing) LED pycom.rgbled(0xff00)   # make the LED light up in green color pycom.heartbeat(True)  # enable the heartbeat again

LoRa
See https://www.thethingsnetwork.org/docs/devices/lopy/usage.html and https://docs.pycom.io/lopy/library/network.html#class-lora

If you use the things network for the application, see https://staging.thethingsnetwork.org/applications