6. Embedded Programming
Now we are gonna learn about programming, or at least put in practice some of the stuff I learnt this week
Okay, so what does "Embedded Programming" mean?
As far as I understand, it refers to the process of writing code for embedded systems. Embedded systems are specialized computing systems that are designed to perform dedicated functions or tasks within larger systems. Unlike general-purpose computers, embedded systems are often part of a larger device or product and are designed to execute specific functions, usually in real-time. Since this is a really interesting subject, I invite you to take a look at our group assignment where you will find further comparison of the performances and development workflow for different architectures and you will be able to take a look on the different datasheets of the microcontrollers found at FabLab Puebla.
DATASHEET OF MY MICROCONTROLLER SEEED XIAO-RP2040
Features | RP2040 |
---|---|
CPU | Dual-core ARM Cortex-M0+ |
Clock speed | Up to 133 MHz |
Bit depth | 32-bit |
Storage | 264KB of SRAM, and 2MB of on-board Flash memory |
I/O pins | 30 GPIO pins |
Power | 1.8V - 5.5V |
Dimensions | 20x17.5x3.5 mm |
Bluetooth | No |
WiFi | No |
How to program | USB mass-storage boot mode, drag-and-drop programming |
Special Functions | USB 1.1 Host/Device, 8 Programmable I/O (PIO) state machines |
HARDWARE
Now let´s get to code… First, let´s get my cable type C and plug my device.
Find my port, and we are ready to go.
Now this is my thought process:
So, with this, I had to write my ideas on code them on the code.
I had one mistake, did not know what was going on, it turned out to be this mistake hahaha, kinda dumb.
Literally missing a braket hahaah
But I got these results:
the code: