It Lives
/I’ve printed a part with the right sized holes, fitted the switches and the pixel ring and wired it up. And it lives (or at least lights up red). Now I have some software to write.
Rob Miles on the web. Also available in Real Life (tm)
I’ve printed a part with the right sized holes, fitted the switches and the pixel ring and wired it up. And it lives (or at least lights up red). Now I have some software to write.
I’ve got another Raspberry Pi PICO powered project (that’s a lot of alliteration) in the works. To celebrate this I visited my box designer program (otherwise known as 2,500 lines of ‘technical debt’) and added the PICO platform to it. Then I printed it out and it works fine. This is the smallest box you can make, it just has a hole for cables and a slot for the USB connector. I can now add the PICO to other device designs and it should just work. I’ve put the design on Thingiverse, you can find it here.
It has been really nice to see how the folks at AdaFruit have got behind the Raspberry Pi Pico device. They’ve just released a set of 3D printable designs that you can use to make cases , some of which fit onto Lego parts.
This is the flip side of the fitting. It looks a bit of a mess because it was all printed on top of support material. However, it does work. The circles get a good grip on the pins. You can find these, and the other designs, on the AdaFruit site here.
This is a nice little add-on for a Raspberry Pi Pico. It’s a hex keypad with very pretty illuminated buttons. It’s easy to set the colours of the buttons and read their state into a Python program (not tried C++yet).
I’m very tempted to move the two button game onto this platform, I think it would work rather well. You can get the kit from here. Remember that you’ll need a Raspberry Pi Pico to plug into it as well.
I’ve designed a little holder for the Raspberry Pi Pico which makes it easy to fit inside a case. I usually make do with double sided sticky tape, but this lets me give my builds a slightly more professional appearance. The pillars will take M2 self tapping screws and the mounting holes M3 bolts. You can find it on thingiverse here.
The pillars have holes which have a radius of 2.0mm and the mounting holes have a radius of 1.6mm. These are numbers that I’ve found work with my printer. If you want to change these values you can find the OpenSCAD program that made the mounting plate here.
This is the holder in use, fitted inside my two button game.
What can you get for £3.60? Maybe a half a pint of craft beer? Perhaps a Happy Meal? Or a magazine? Or an embedded computer with enough power to drive a video display directly?
I’ve been going on about cheap computers ever since I discovered AliExpress.com where you can buy tech straight from China at silly prices. I’ve been getting ESP32 and ESP8266 devices shipped over for a few quid and even with the recent changes to tax (we actually have to pay VAT now) they are still a very good deal. But they have to come all the way from China which takes time and you’re never quite sure what you are going to get. And if you want to use them as the basis of a product it gets tricky as ordering large numbers of devices turns out to be much harder than just buying one or two.
The new chip from Raspberry Pi is going to change a lot of this. It’s called the RP4020 and takes the Raspberry Pi expertise in hardware design into a new area. This is not a personal computer. You can’t process words on it. But you can put it inside devices and get it to control them. It runs C++ or Python code which you can create on a Raspberry PI, Windows PC, Apple Mac or Linux computer.
You can get the new chip in a variety of platform configurations. I think the best configuration available at the moment is the one sold by Raspberry Pi. It’s called the “Pico”. You can buy it for 3.60. I ordered a couple as soon as I heard about it and they arrived yesterday.
It just works and the documentation support is fantastic. You can get complete details here. These include datasheets for the chip, pinouts and specifications for the Pico configuration and full details of Python and C++ development. It took me no time at all to get the device working and my code running on it.
A while back I made a Two Button Game written in Python and using a Raspberry Pi. I wondered how easy it would be to convert it to use a Raspberry Pi Pico device. So at 1:00 pm I started and by 2:00 it was all working on the device. This is not because I’m clever. It’s because of the effort they have put into making the process smooth. These are the things I learned doing the conversion.
Creating and deploying Python programs is very quick to do. I used the Thonny program which lets you edit and deploy your code. The latest version even helps you get MicroPython onto your Pico.
You can power the device from a wide range of sources. I should be able to halve the number of batteries I have to use in my little game, and they should last a lot longer.
You have to search around for some of the code you’ll need, but the application notes are a great start. I got the code to control the NeoPixels from there.
There are some really interesting features on the new chip. It has special hardware to automatically generate sequences of pulses without the involvement of your code. It has two processors which can run at full speed together. It has a real time clock. You can use a second Pico device to read the debug signals from a first and provide hardware level debugging. it will act as a USB host, so you can hang a keyboard or a mouse off it.
The Pico device has been designed to be easy to mount on a PCB so that it can form the “heart” of a device which needs a few more components.
This is a lovely new device for developers and hobbyists. The fact that you are buying it from a UK suppler makes using it much easier and I really like the idea of a UK company making something as gosh-darned useful as this.
From a performance perspective the Raspberry Pi device stands up very well against the ESP32 that I would normally use. The only snag (and I think it is a big one) is that there is no wireless connectivity. You can connect a Pico device via serial, USB, I2C and SPI but all these use cable. The ESP32 device that I normally use provides both Bluetooth and WiFi connectivity. I really, really, really hope that the Raspberry Pi people have a roadmap for the platform that includes popping WiFi and Bluetooth on a future Pico board. Because then it would be unbeatable.
Update: Ha. Digital dyslexia. I got the number of the chip the wrong way round in title of the original post. It’s fixed now.
These arrived today. Very interesting. I’m looking forward to playing with them.
Rob Miles is technology author and educator who spent many years as a lecturer in Computer Science at the University of Hull. He is also a Microsoft Developer Technologies MVP. He is into technology, teaching and photography. He is the author of the World Famous C# Yellow Book and almost as handsome as he thinks he is.
Make your own programming language. Find out more here.