Software apps and online services
I backed the Wio Link development board in a Kickstarter campaign. It is based on an ESP8266 chip to create IoT applications using Grove modules. It needs internet connection and a mobile app with no coding to work. But I wanted to try it as a generic ESP8266 device so I deployed a MicroPython firmware. You can follow the steps below to do it yourself.
You can download the stable firmware builds for 1024kb modules from the MicroPython downloads page: http://micropython.org/download#esp8266.
To flash the firmware you need esptool.py on your computer. You will need either Python 2.7 or Python 3.4 or newer installed on your system. You can find this tool here: https://github.com/espressif/esptool/, or install it using pip:
pip install esptool
Now connect the Wio Link using a USB cable to your computer and erase the entire flash of your Wio Link before flashing new MicroPython firmware.
esptool.py --port /dev/cu.SLAB_USBtoUART erase_flash
Please use following command to load the firmware:
esptool.py --port /dev/cu.SLAB_USBtoUART --baud 115200 write_flash --flash_size=detect --flash_mode=dio --flash_freq=40m 0 esp8266-20180511-v1.9.4.bin
The above command's arguments are specific to Wio Link board. If you find any issue, try to change baud rate or port relevant for your computer.
Now you can use screen or CoolTerm or any similar serial terminal (baud rate 115200) to access MicroPython REPL over serial port.
>>> print('Hello Wio Link!') Hello Wio Link!
You can also use the attached wiolink_grove_ultrasonic_ranger.py to play with Grove - Ultrasonic Ranger module. You need to copy the above file to Wio Link board. First install ampy tool:
pip install adafruit-ampy
and use following command to copy the file:
ampy --port /dev/cu.SLAB_USBtoUART put wiolink_grove_ultrasonic_ranger.py
Then attach a Grove Ultrasonic ranger to Digital2 grove connector on the Wio Link and reconnect to the REPL and run the following code line by line:
>>> from machine import Pin >>> import GroveUltrasonicRanger >>> p15 = Pin(15, mode=Pin.OUT) >>> p15.on() >>> ultrasonic = GroveUltrasonicRanger(13) >>> while True: distance = ultrasonic.get_distance() print(distance)
The power supply of Grove sockets is controlled by a MOSFET switch which is governed by GPIO 15, so we need to pull up GPIO 15 to power on the Grove system.
Now you can enjoy your Wio Link with MicroPython, thanks for reading!