HOME  |   ENGINEERING  |   RESEARCH  |   CONTACT
Computer Engineering Projects
Setting up Pycom WiPy

Overview

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.


Hardware Setup
Pycom Hardware Setup by Pycom.
Pycom WiPy Overview by Core-Electronics.
Pycom Firmware Update by Core-Electronics.

1. Download required files from the Pycom website. The files you need incude:

  • Latest firmware DFU for Expansion Board
  • DFU Utility to upload to board
  • Zadig installer tool
Any Pycom modules such as Wipy should be removed from the Expansion Board.

2. Install Driver by running the Zadig program.
Use the up/down arrows to ensure that the driver selected is libusbK (v3.0.7.0). 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:
DOS> dfu-util-static.exe -D expansion31_0.0.11.dfu
You need to hold down S1 before powering device, then release 1 second after before running the above command.
Successful update should finish with the following message:
Copying data from PC to DFU device
Download [=========================] 100% 16384 bytes
Download done.
state(2) = dfuIDLE, status(0) = No error condition is present
Done!

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:
File: boot.py
# boot.py -- run on boot-up
The main project file below connects makes a Wifi connection and indicates GREEN if successful.
File: main.py
# main.py -- mainfile
import pycom
import time
from network import WLAN

# Wireless network settings
WIFI_NETWORK_NAME = "mynetwork"
WIFI_PASSWORD = "myssid"

# Turn off the heartbeat and change the LED to red.
pycom.heartbeat(False)
time.sleep(0.1)
pycom.rgbled(0xFF0000)

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
  print('.', end='')
  time.sleep(0.1)

print(" DONE!")
# Display a green light
pycom.rgbled(0x00FF00)
Configuration file:
File: pymakr.conf
{
  "address": "COM7",
  "username": "myusername",
  "password": "mypassword",
  "sync_folder": "",
  "open_on_start": true,
  "safe_boot_on_upload": false,
  "sync_file_types": "py,txt,log,json,xml",
  "ctrl_c_on_connect": false
}
Use the Upload button to upload the code to the Wipy. The code should run until you press CTRL-C



PROJECTS

» Softlatch Project
   Power latch with software power-off function
» INA219 Serial Project
   Serial ammeter for project USB supply
» AuraBean Project
   Probability and sensitivity research tool
» AuraBean II Project
   Web-enabled probability and sensitivity research tool
» Guessology Games
   Random browser-based guessing games


HOW-TO

» Raspberry Pi Programmer
   Programs ATTiny85 microcontrollers
» Pycom WiPy Setup
   Setup and program the WyPi



© 2020 Cedric Joyce