RoadTest: Raspberry Pi Pico
Author: momo1234
Creation date:
Evaluation Type: Development Boards & Tools
Did you receive all parts the manufacturer stated would be included in the package?: True
What other parts do you consider comparable to this product?: Arduino Nano 33 IoT, ESP 32
What were the biggest problems encountered?: - Lack of a built-in wifi/bluetooth - Comparatively lower memory on-board - No header pins come with the board
Detailed Review:
Raspberry Pi Pico Review
There is hardly a doubt on the popularity of Raspberry Pi boards. They have fueled a whole new league of hobbyists and developers, enticing with stack full of features providing makers with biuld ideas where only sky is the limit.
I have always been an ardent Arduino user. I find it comfortable to work with, and this familiarity often nudges me towards 'Arduino'-centric decision. I never quite got to use a Raspberry Pi (for various reasons), even though I always wanted one since I heard my teachers describe it as 'a mini computer that can do wonders' (referring to the first SBCs made by RPi).
Till I was offered an opportunity to test the Raspberry Pi Pico -RPi's newest offering, and my first Raspberry Pi. Although not an SBC, it is pretty interesting nonetheless!
I) Initial impressions and unboxing :
I received a big box from UPS containing the Raspberry Pi Pico for this Roadtest. After ripping through two boxes, I found my Raspberry Pi Pico -no boxes, no manuals, no neat sticker file to adore my laptop with (remember, I have been a long time Arduino user). Just the board, inside one of the files for the spool that Raspberry Pi ships them into to vendors. This lack of anything other than just the board is a little disappointing, at least to me. I know the price is reasonably low, but including header pins would have made this a really comfortable device.
The Pico arrives in a file from a larger spool. No fancy packaging.
The familiar flat-bottom design of the Pico.
And right off the bat, I was greeted with a familiar design. Flat bottom –no protrusions at all. Very reminiscent of the Arduino Nano IoT that I recently reviewed. But the two couldn't be any more different, and we'll discuss about it later.
II)Getting Started :
One of the best thing about owning a Raspberry Pi device is the amazing support material that accompanies it. And the Pico is no different. The documentation provided at "Getting Started with RP2040 – Raspberry Pi" could not be anymore well laid out. From importing Micropython/C/C++ onto the board, to ideas for getting you started right away -this has everything. And if you need some more reading material, say a step by step guide on how to solder header pins on your new Pico, or perhaps a good project idea to getting started with the Raspberry Pi Pico, Get Started with MicroPython on Raspberry Pi Pico is essentially your bible. It has everything -and I mean EVERYTHING -from the nitty-gritty intricacies of your Pico, to just getting started with Micropython in general. I highly recommend to get this book. It is a lovely read.
Get Started with MicroPython on Raspberry Pi Pico is your go to guide for all things Pico.
III) Features, spec-sheet and comparison :
The key features of the new Raspberry Pi Pico, as quoted directly from its official spec-sheet are:
• RP2040 microcontroller with 2MByte Flash
• Micro-USB B port for power and data (and for reprogramming the Flash)
• 40 pin 21x51 'DIP' style 1mm thick PCB with 0.1" through-hole pins also with edge castellations
• 3-pin ARM Serial Wire Debug (SWD) port
• Simple yet highly flexible power supply architecture
• High quality, low cost, high availability
• Comprehensive SDK, software examples and documentation
• Dual-core cortex M0+ at up to 133MHz
• 264kByte multi-bank high performance SRAM
• External Quad-SPI Flash with eXecute In Place (XIP) and 16kByte on-chip cache
• High performance full-crossbar bus fabric
• On-board USB1.1 (device or host) • 30 multi-function General Purpose IO (4 can be used for ADC)
• 12-bit 500ksps Analogue to Digital Converter (ADC)
• 2 × Programmable IO (PIO) blocks, 8 state machines total
A pinout diagram for the board can be seen as follows:
Now that is quite a list of features to make the board quite nifty and useful for all modern purposes. Could this have been better though? ABSOLUTELY.
For starters, this board has an on-board LED and a fairly accurate temperature sensor. But that is all you get. Compared to this, the Arduino Nano 33 IoT has a lot more. But again it is substantially expensive too, so I must not be biased here.
Although this might not be a terrible selection for the price, what irked me more was the lack of WiFi/Bluetooth on a modern board such as the Pico. Dev boards like the ESP32, that roughly lie on a similar price bracket, not only offer those connectivity options, but have a better RAM, a better Flash, and a better clock speed.
Also, for some reason, the Raspberry Pi Pico has no reset button. You really have to build one if you need one, and Raspberry Pi has an official tutorial for it, which you can view here.
Setting up the board is fairly easy. I assume most of the makers out there will play around with MicroPython for this board -and every help Raspberry Pi foundation provides is mostly based on that too. So finding support materials is really easy, as mentioned earlier too.
Connect it to your PC with a regular micro-USB to USB A (your average mobile charging cable basically), and hold the BOOTSEL Button down. Your Pico folder should pop up on your screen. Now it has an HTML file that will direct you here, where you can just follow the steps shown to drag and drop MicroPython to be installed on the board. The board will disconnect momentarily, and then show up again, ready to run Micropython this time. The whole process takes about a minute at most, and couldn't be any simpler.
However, the board also runs CircuitPython -which to me is just a little fancier (i.e., a slightly better built-in library support). So I decided to use that. The procedure still majorly remains the same, with the exception that CircuitPython needs to be downloaded from Downloads (circuitpython.org), for the Pico board.
We will use Thonny, a simple Python IDE, to code. Setting it up is very easy.
Once I had everything set up, I tested the Pico for proper setup with a simple blink code, that blinks the on-board LED.
import time import board import digitalio led = digitalio.DigitalInOut(board.LED) led.direction = digitalio.Direction.OUTPUT while True: led.value = True time.sleep(1) led.value = False time.sleep(1)
Once the LED blinking is successful, I decided to make something a little more advanced.
One thing that have always fascinated me were keyboards. I knew so little about these humble input devices that are a ubiquitous part of my life. So I decided to try and make a prototype of my own, using the Raspberry Pi Pico.
Here is where CircuitPython came into handy. It supports USB_Hid library built-in, and is important for our purposes. We will also download a library from Adafruit's CircuitPython resources, that let us define key codes for the different keyboard keys.
We will use a small tactile button to initially test our code and setup, connecting one terminal to a GPIO (I used 15 since it is in the corner and easier to access for me) and the other to power (NOTE: Keeping a copy of the pinout diagram with you will be really handy, since the labels for all the ports are printed on the back of the Pico).
We will run the following code:
import time import digitalio import board button1_pin = board.GP15 button1 = digitalio.DigitalInOut(button1_pin) button1.direction = digitalio.Direction.INPUT button1.pull = digitalio.Pull.DOWN while True: if button1.value: print("Button press detected") time.sleep(0.1)
Once the code is compiled and running on the Pico, we can click our button, and will get our expected output:
As we can see, with each press of a button, we get a text. This verifies our circuit.
After adding a few more buttons, the circuit looks something like this:
Not having a rail of header pins included was irksome, so I ended up taping the Pico onto the breadboard (not advisable, but works perfectly fine). The code to program all the buttons are:
import time import digitalio import board import usb_hid from adafruit_hid.keyboard import Keyboard from adafruit_hid.keycode import Keycode keyboard = Keyboard(usb_hid.devices) button1_pin = board.GP15 button2_pin = board.GP14 button3_pin = board.GP13 button4_pin = board.GP12 button5_pin = board.GP11 button6_pin = board.GP10 button1 = digitalio.DigitalInOut(button1_pin) button1.direction = digitalio.Direction.INPUT button1.pull = digitalio.Pull.DOWN button2 = digitalio.DigitalInOut(button2_pin) button2.direction = digitalio.Direction.INPUT button2.pull = digitalio.Pull.DOWN button3 = digitalio.DigitalInOut(button3_pin) button3.direction = digitalio.Direction.INPUT button3.pull = digitalio.Pull.DOWN button4 = digitalio.DigitalInOut(button4_pin) button4.direction = digitalio.Direction.INPUT button4.pull = digitalio.Pull.DOWN button5 = digitalio.DigitalInOut(button5_pin) button5.direction = digitalio.Direction.INPUT button5.pull = digitalio.Pull.DOWN button6 = digitalio.DigitalInOut(button6_pin) button6.direction = digitalio.Direction.INPUT button6.pull = digitalio.Pull.DOWN while True: if button1.value: keyboard.press(Keycode.RIGHT_ARROW) time.sleep(0.1) keyboard.release(Keycode.RIGHT_ARROW) if button2.value: keyboard.press(Keycode.LEFT_ARROW) time.sleep(0.1) keyboard.release(Keycode.LEFT_ARROW) if button3.value: keyboard.press(Keycode.DOWN_ARROW) time.sleep(0.1) keyboard.release(Keycode.DOWN_ARROW) if button4.value: keyboard.press(Keycode.UP_ARROW) time.sleep(0.1) keyboard.release(Keycode.UP_ARROW) if button5.value: keyboard.press(Keycode.ENTER) time.sleep(0.1) keyboard.release(Keycode.ENTER) if button6.value: keyboard.press(Keycode.SPACE) time.sleep(0.1) keyboard.release(Keycode.SPACE) time.sleep(0.1)
Again, once programmed, we can test the working of the keys. I typed some text on wordpad, and the buttons work fine:
or, you can play games!
I tried this on Sonic too, and with more controls than the Chrome Dino Game, it was more fun to play with.
What next? Now that I know that the Raspberry Pi Pico is capable of handling USB_Hid I/O tasks, I will probably see it it can be developed into a proper keyboard, or atleast a game controller. There are enough GPIO available on the board for these purposes.
V) Conclusion:
The Raspberry Pi Pico is a good development board with enough power and features for beginners and hobbyists to create some nifty DIY stuff. But it is a hit and a miss in some places -specially with the lack of connectivity options, an important thing for a board of this nature to have in today's IoT era. Will I recommend it? Absolutely. In fact, I can wholeheartedly recommend this to anyone thinking about getting a small Dev board in the likes of Arduino Nano or something similar. But I also hope that some improvements are done to this board too in its future iterations (if any), to make it a true bang for the buck product.
I would like to thank rscasny for giving me an opportunity to test this impressive piece of hardware.
P.S.: I have attached a file with some useful links to resources for anyone who wishes to use their Raspberry Pi Pico for some DIY ideas.
Top Comments
Nice road test report.
DAB