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.

Open ARDUINO IDE

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:

My Neopixel wasn’t working, that´s where I remembered that I had to configure it, and download some drivers, sooo:

I followed these steps: Sketch > Include Library > Manage Libraries; searched for “Adafruit_NeoPixel” and just installed that…

Now, I got hands on it, and I used this code:

And got these pretty results, pretty good, I achieved what I aimed for… I was going to sleep but I remembered that the neopixel could change colors, soooo, using a code I ´ve got from the group assignment as inspo, I mixed my code and this new code.

the code:

the inspo code:

Mixed it, and got this code:

And gave it the fun touch of colorssss!

the code:

Finally, some of my favorite shots, and what I would call my HERO SHOTS!

Lookinnnn´ fineee

Real colorss

I love this one

now they look like stars!

prettyyy

We are done for today, thank youuu