Use an MCP3008 analog to digital chip to expand the Raspberry Pi Pico’s analog reading capabilities

Back in 2013, I covered Matt Hawkins’ excellent post about using an MCP3008 analog-to-digital chip with a Raspberry Pi to read analog values, something that the Pi was previously incapable of doing. Now, we have the Raspberry Pi Pico which gives us the ability to read analog signals using its on-board capabilities. However, sometimes we need access to more analog inputs. This is where we can revert back to using an external chip, such as the MCP3008.

Romilly Cocking, who has been around the Raspberry Pi community since the very beginning, has taken on this task using MicroPython, Raspberry Pi’s recommended language for those who don’t want to get into the lower level stuff of C/C++. You can read his tutorial here – it goes into a lot of detail about SPI and how he found out the wrong way of doing it before finding success, and it’s well worth a read! 🙂

Raspberry Pi Pico & giving the Pimoroni Pico Explorer a workout

Tony Goodhew has written up a great Instructable to help you get the most out of the Pimoroni Pico Explorer using the Pimoroni MicroPython firmware.

He uses the screen to do various drawing exercises at a low level (circles, squares, that sort of thing) and also some mathematical function rendering. He finishes off by taking a potentiometer and an LED, using them in combination with PWM to create a dimmable lamp with a graphical readout of the pot level on the screen. You can take a look at the Instructable here.

Create a miniature version of Space Invaders on an LCD screen with the Raspberry Pi Pico and MicroPython

James from Print N Play has taken his Raspberry Pi Pico, a mini SSD1306 screen and a potentiometer and created a (very) miniature version of arcade classic Space Invaders. You can see how he did it in his very detailed video below. One of the great things about the video is that you can see how to install a required library onto the Pico from Thonny. You can see his MicroPython code on GitHub here.

Thanks to Les Pounder over at Tom’s Hardware for spotting this one.

Use your Raspberry Pi Pico as a HID device to give mouse and keyboard input using Adafruit’s CircuitPython

Hriday Barot has written up a couple of example scripts for the Raspberry Pi Pico that will mimic mouse and keyboard input to the USB port it is plugged into. The scripts, written in CircuitPython, are very simple, but you can see how they work easily enough.

This seems ideal for something like a Stream Deck, which can control something like OBS when doing video broadcasting. Alternatively, you can do what Novaspirit Tech did and plug the Pico into your mobile phone to automate an Android game. Very clever stuff. You can read how he did it by visiting his blog.

Create a soil moisture sensor with a Raspberry Pi Pico and an LED ring

Andy Warburton has blogged this great project with the Raspberry Pi Pico. He has used a SparkFun Soil Moisture sensor to detect moisture levels inside a plant pot. This is then wired up to the Pico, using one of the analog inputs to take the readings. The readings are then briefly analysed and a colour indicator on a Neopixel circle is then activated. It’s a great proof-of-concept for using the analog capabilities of the Pico and Andy’s blog post is well worth a read and it includes the code for you to get going.

How to develop for the Raspberry Pi Pico on a Mac

Tony Smith, aka smittytone, has written two articles that are well worth a read if you’re trying to develop for the new Raspberry Pi Pico with a Mac.

The first is how to program a Pico in C and the second is to do with debugging the Pico with another Pico and a Mac.

Having a range of development platform options for the Pico is, I think, key to making it a success in the Pi community. So, thanks to Tony for working it all out!