A look at a Raspberry Pi Pico
As you probably know I do like my Raspberry Pi. But the RPi Pico is a different kettle of fish. I’m only mentioning it here because it is programmable in C/C++ and some may find it a less say overwhelming place to learn C than say a traditional Raspberry Pi.
What’s different between a Pico and a Pi 4B? A Pico uses a microcontroller- basically a CPU with built in RAM, bit of flash RAM, real time clock. RAM is tiny compared to any Pi. Just 264 KB (That’s still much more RAM than my CBM Vic-20 in 1981 with 3.5 KB of RAM!) and 2MB of Flash RAM. The CPU, an ARM CPU designed in the UK runs at clock speeds up to 133 MHZ. A Pi 4B runs at 1.5 GB, over 11x faster.
The biggest difference is that a Raspberry Pi runs any operating system you want. Microcontrollers are different. To run a program on a Pico you have to program it into Flash RAM first. You can do this with drag and drop. See here for C/C++. The Pico is an embedded system. RAM is used for data, stack etc but not the program which runs out of Flash RAM.
But if you like hardware then this is an excellent place to get started. You get all these (see here for Specifications).
- 26 × multi-function GPIO pins
- 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × controllable PWM channels (PWM I’m guessing is pulse-width modulation).
- Accurate clock and timer on-chip
- Temperature sensor
- Accelerated floating-point libraries on-chip
- 8 × Programmable I/O (PIO) state machines for custom peripheral support
So what about games? Not really. Or at best very simple games using the single LED. No, this is about learning C (or C++ or even- shock – Python) and interfacing hardware. You might for example put one of these inside a drone to provide control software.