Thursday, January 28, 2021

Raspberry Pi Pico

As soon as I heard about the Pico I placed an order. These boards are more like an Arduino than a (linux capable) Raspberry Pi. Like the blue and black pill, they are much more powerful than most Arduino and have a dual core Arm chip.

Hackaday has done an excellent job of describing the new chip and this board in their writeup.


While you can program in C++, I'm tinkering with the MicroPython environment. To get started, you download Thonny and run it. Hold down the button on the board and plug it in to the computer with USB. Thonny will see it and offer to install MicroPython. Next, the board reboots and when it comes back there's some sort of serial protocol running between Thonny and the board. 

Here is the blink example.

I find that sometimes I get a device busy message and must click the stop button and then the run button again.

Hardware access is via a module called machine. This provides a well organised set of interfaces to things like threads running on the other core, interrupts, low power sleeping, timers and serial interfaces including I2C and SPI.


After playing with the Python environment, I've gone ahead and installed the C++ tools by following the instructions on Ubuntu Linux. All went smoothly for me but I do miss the huge number of libraries that exist in the Arduino world - good news is that a port of the Arduino core is on the way.

It's a bit fiddly having to plug in the USB cable while holding the BOOTSEL button down and so I've ordered a little USB hub with port switches on it.

A couple of improvements for a future version - please use a USB-C connector rather than the flimsy micro USB socket, also it would be handy to have the pin markings on the top of the board rather than the bottom.  

No comments:

Post a Comment