Skip to content

9. Embedded programming

This week, our instructor trained us on the ARDUINO IDE and how to use the program, he explained how it works and how to make our own codes. Next I will show you what I learned.

RASPBERRY PI PEAK

Based on RISC architecture

The Raspberry Pi Pico is a new low-cost, high-performance microcontroller board with flexible digital interfaces. You don’t use monitors or keyboards, but rather program them to take their input and send their output to the input/output pins. With these programmable connections, you can turn on lights, make sounds, send text to screens, and much more. It is based on the Raspberry Pi RP2040 microcontroller chip.

Characteristics:

  • RP2040 microcontroller with 2 MB Flash (Dual-core cortex M0+ up to 133 MHz)
  • Operating voltage: 3.3V.
  • 40-pin 21 × 51 ‘DIP’ style
  • 3-pin ARM Serial Wire Debugging (SWD) port
  • Micro-USB B port for power and data (and for reprogramming the Flash)

It has more details but I selected the ones I considered most important. I also leave you a PIN DIAGRAM so that you take into account which pins will be used to program, as * you can see the LED belongs to GP25.

IMAGE OF RASPBERRY PI PICO

PROGRAMMING THE Raspberry Pi Pico PROGRAM.

For training development, I first downloaded the MicroPython UF2 file for Raspberry pico and followed the installation instructions.

Then I downloaded the Thonny IDE and installed it, this program is used to program the Raspberry Pi Pico.

If you want to learn more about this topic, you can download the book MicroPython on the Raspberry Pi Pico. There is very detailed information there on how to put the programming code in Thonny.

I opened the Thonny IDE program and in the bottom right corner clicked on MicroPython(Raspberry Pi Pico)

The code you see in the following image makes the LED turn on and off every 0.5 seconds. The pin I used is 25, since that belonged to the LED according to the PIN DIAGRAM, you can also see that I put two values, 1 one 0 is to turn on and the other to turn off.

and finally click on the green button to program.

The programming in Thonny has been very easy to understand, even the signs used are minor compared to other programs.

Thanks to the Thonny program, it allows us to execute our code step by step and visualize what is happening at all times. It is normally used to find errors in our programs and to be able to solve them.

IMAGE OF RASPBERRY PI PICO


Last update: April 17, 2023