Getting started with the WiPy development board
I came across WiPy back in 2015 when I backed their project on Kickstarter. In exchange for a little bit of cash I received the WiPy development board as well as an expansion board, which makes it easier to get started with this piece of development kit.
What is WiPy?
WiPy is a tiny development board, based on an ARM Cortex-M4 microcontroller. It has a bunch of I/O, built in WiFi and it runs MicroPython, a lean implementation of Python 3 destined to run on a microcontroller. For detailed specs and more info about WiPy go here, for more info about MicroPython go here.
It is easier to get started with the expansion board as it allows you to plug the WiPy into it, and use a micro USB input as power source. You could also just stick 3.3V volts on the right pins with some wires. For detailed info about pinouts etc. go here.
Before we go further let’s make sure we are running the latest firmware. Go here to fetch latest firmware files. Once the board is powered up it should show up as a WiFi access point. Go ahead and connect to it through your PC/Mac as per usual. ++Note: when you are connected to the WiPy your machine will not be connected to your router anymore so your internet connection will drop off.++
You can log into the remote REPL terminal on the WiPy over telnet. It is likely that a fresh board will be available on
192.168.1.1, as this the default IP address for the WiPy board, user name should be
micro and password
python. Once connected we can check the firmware version of the board.
Once you are connected to the WiPy you can upload firmware files onto it over FTP, since there is a server running on the board. For detailed connection setting go here. Upload the firmware files, wait for transfer to finish and reset the board, you can find detailed instructions here. We should now be running the latest firmware.
First WiPy Program
The WiPy runs MicroPython, so we can either try some simple Python over the remote REPL or we can upload our app files over FTP. Let’s start with remote REPL so go ahead and connect to the board over telnet using putty or some other telnet client. As a simple test use the below code to toggle the main heart beat LED on the board.
from machine import Pin import wipy wipy.heartbeat(False) led = Pin('GP25', mode=Pin.OUT) led(1) led(0) led.toggle()
As you type these commands in the telnet window, the red LED should turn ON, OFF and then back ON again. Go ahead and experiment a little more with these commands, try the below code to make the LED toggle 10 times with a 500ms break in between toggles.
from machine import Pin from time import sleep_ms import wipy wipy.heartbeat(False) led = Pin('GP25', mode=Pin.OUT) for x in range(10): led.toggle() sleep_ms(500)
As you can see, the fact WiPy runs MicroPython is very handy, you can rapidly develop scripts without installing any compilers or special tools. Stay tuned for more posts about the WiPy where I will present some more advanced examples like:
- getting started with Blynk
- talking to a temperature sensor
- measuring distance with an ultrasonic sensor
In the meantime, go here to explore the MicroPython API documents and experiment a little more with the WiPy board.