MicroPython and Pi Pico

The CTI uses Pi Picos to teach LabVIEW, but you can also use them to learn Python.

Book cover for Getting Started with MicroPython on Raspberry Pi Pico. Breadboard with lots of components attached.

The LabVIEW Community Training Initiative (CTI) has been making use of the Pi Pico. It's a small ~$4 microcontroller. They have some firmware you can put on it that turns it into a VISA device that you can talk to from LabVIEW over a USB cable. It's a pretty cool tool for learning to talk to instruments from LabVIEW. However, you can do lots of other cool stuff with a Pico. To unlock its full power you'd probably need to program it in C (that's what the VISA simulator is programmed in), but you can unlock a lot just using MicroPython and there is an official book to get you started.

This book assumes you have basically zero knowledge of Python or microcontrollers. It's a short book. It's pretty easy reading - the target audience is pretty young and inexperienced. It's written more for kids than engineers. If you know a little bit, which if you are reading this blog you probably do, it can seem rather slow to take off in the beginning.

The book is full of example projects. It uses the Thonny editor which is quick and easy to set up. It starts out with the very basics - blinking LEDs, reading in pushbuttons, moving into potentiometers, various types of sensors, and ultimately I2C and SPI devices. On the programming side, it starts with basic single-loop programs and then moves into launching threads, interrupt-based programming, and basic file logging. In the end, you will know enough to be able to write a very basic datalogger or other simple project.

Use Case

The Pi Pico is a cheap low-cost way to do some basic prototyping or simulation. It's certainly a good tool for playing around with various types of sensors and learning some basic Python. Would I recommend it for most customer projects? Probably not, but there might be a few places where it makes sense.