Computer Engineering Projects
Setting up Pycom WiPy
This is an overview of the steps we followed to setup and configure the WyPi on Windows.
That parts we used were the WiPy module, Expansion Board 3.0, and micro SD card.
1. Download required files from the Pycom website. The files you need incude:
Any Pycom modules such as Wipy should be removed from the Expansion Board.
- Latest firmware DFU for Expansion Board
- DFU Utility to upload to board
- Zadig installer tool
2. Install Driver by running the Zadig program.
Use the up/down arrows to ensure that the driver selected is libusbK (v126.96.36.199).
You need to hold down S1 before powering device, then release 1 second after.
When you see Unknown Device #1 hit the Install WCID Driver button.
3. Upload DFU to expansion board by typing:
You need to hold down S1 before powering device, then release 1 second after before running the above command.
DOS> dfu-util-static.exe -D expansion31_0.0.11.dfu|
Successful update should finish with the following message:
Copying data from PC to DFU device|
Download [=========================] 100% 16384 bytes
state(2) = dfuIDLE, status(0) = No error condition is present
3. Developing Code The Atom IDE is recommeded for developing code for the Pycom devices. Install and run the application. When you fit the Wipy module to the Expansion board and plug into the computer via the USB cable, Atom should detect the appropriate comport.
Create a project with a lib folder and three following files:
The main project file below connects makes a Wifi connection and indicates GREEN if successful.
# boot.py -- run on boot-up
# main.py -- mainfile
from network import WLAN
# Wireless network settings
WIFI_NETWORK_NAME = "mynetwork"
WIFI_PASSWORD = "myssid"
# Turn off the heartbeat and change the LED to red.
print("Connecting to Wifi ", end='')
# Use the WiFi network's name and password to connect
wlan = WLAN(mode=WLAN.STA)
wlan.connect(WIFI_NETWORK_NAME, auth=(WLAN.WPA2, WIFI_PASSWORD), timeout=5000)
while not wlan.isconnected():
# Displays a line of dots to show that something's happening
# Display a green light
Use the Upload button to upload the code to the Wipy. The code should run until you press CTRL-C