Skip to content

About

Code for the CuWatch PCB

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

96 Commits

Folders and files

Repository files navigation

CuWatch_code

Code for the CuWatch PCB. The code is in MicroPython. Target is the Raspberry Pi Pico-W microcontroller.

development instructions

Install micropython on the pico-w in the usual way (see micropython documentation.) Currently you can download the uf2 file for the pico-w from this web page. As of 11/4/2025 we are using version 1.26. To upload micropython on a Pico-W that is sitting on a Pepper baseboard, connect the Pico-w to your computer using a micro-USB cable. Hold down the reset button on the base board and the white button on the pico simultaneously. Release the reset button. The Pico-W will show up as a disk on your computer. Drag the uf2 file to that disk. The pico-w will reboot and disconnect from the computer.

local development environment

Install mpremote and mpy-cross in your favorite local python enviromnent usins pip.

pip install mpremote mpy-cross

How to prep a board for use in Physics 1110 at Cornell

Clone or copy this repo to your local machine

Either download the zip file or use git to clone the local repo to your machine.

Register the Pico-W with PhysIT

To be able to log onto the Pico-W web server, its MAC address must be registered with PhysIT. To get the mac address, plug the board into your computer and run the findmac.py script.

mpremote findmac.py

PhysIT will assign a (non-static) IP address to the Pico-W. Add the MAC address and corresponding number to the table here.

Load the latest firmware onto the board

See if you need a non-standard my_secrets.py file

This file has the SSID and wifi password in it. The install scripts create one if none exists. For Physics 1110, this works, since RedRover does not require a password. If you had a wifi password, you'd need a password for the wifi network too.

PASS=None
SSID="RedRover"
MQTT_SERVER="pepper.physics.cornell.edu"

If you are using a MacOS or Linux

There is a shell script that should do what you want. See the script here.

Run as follows

sh ./install_mqtt.sh XX

where XX is the number assigned to the PICO-W. This will allow students to know which board they are using.

Web page

At Cornell the device can be accessed via http://pepper.physics.cornell.edu (must be on-campus to see this board.)

About

Code for the CuWatch PCB

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages