Bringing Arduino IDE coding to the Pi Pico
Les Pounder loves a blinking LED – it probably take him back to the flashing clock on his old VCR he could never reset… ARDUINO Credit: www.arduino.cc
OUR EXPERT
Les Pounder is associate editor at Tom’s Hardware and a freelance maker for hire. He blogs about his adventures and projects at http://bigl.es.
YOU NEED
Pi Pico, Pico W or Pico 2 1x 100 ohm resistor (brownblackbrown-gold) 1x breadboard 4x M2M jumper wires 1x LED Get the code: https://bit. ly/lxf323 code
The Arduino IDE is a popular choice for makers who work with microcontrollers. It writes code that is compiled and written for fast execution on the target microcontroller. But do we really need to spend big money on an Arduino? No! A £4 Raspberry Pi Pico or the new £5 Pico 2 also works thanks to a great piece of software from Earle F Philhower III (https://github.com/earlephilhower/arduino-pico), which makes it easy to write Arduino code on the Pico.
Hello Arduino
Earle F Philhower, III’s Arduino Core works with the Arduino IDE to bring compatibility to the Raspberry Pi Pico’s RP2040 and the Raspberry Pi Pico 2’s RP2350. So, how do we get started?
First we need to install the Arduino IDE. This can be via your package manager or via the ZIP archive or AppImage file. We used the AppImage from the Arduino website (www.arduino.cc/en/software), which required us to make the downloaded file executable (right click > Properties > Permissions > Executable As A Program). Before we can use the Arduino IDE, we need to add our user to a group called dialout, which can access the serial ports. Open a terminal and run the following (change to your username): $ sudo usermod -a -G dialout