Week 4
Feb 15: embedded programming
List of task this week
Group assignment
To see the group assignment go here.
My thoughts on this week’s group assignment compare the performance and development workflows for other architectures: I understand why it would be good to do these comparatives but at my stage, It is much more helpful to me to look at pin out and explanatory pictures. It will probably be helpful in the future but right now the other helps me more. Of course, if I’m looking for something like which have Bluetooth Tis is great.Browse through the data sheet for your microcontroller
I used the Seeeduino XIAO and looked a little over that data sheet but after looking at comparisons I will most likely use Seeed XIAO RP2040 so I decided that that was the data sheet I should check out. I of course did not read all off it letter by letter since it is 646 pages but I looked through it and the summary and explanation pictures were very helpful. Also knowing what pin dose what and to read about the pins. I was later told about this site by my global instructor and it is realy strate forward. I think it will be especially helpful to know where to look when the time comes that I will be in trouble.
Below you can see what type each pin is, you can see the power and the ground, but you can also see which ones are digital pins and which are also analog. Digital pins are used when the signals are either on or off and analog pins are used to read more detailed signals, they can read the voltage potential of something.
Program a microcontroller development board
I borrowed the Seeed Studio XIAO SAMD21 from my classmate Andri because it already had pins in it and for this assignment, I thought it would be nice to use a bread board, there is one led on it but I wanted to play with more than one light so I borrowed a line with three breakout boards with one WS2812B led on each from my work college Arnar.
To start with I downloaded the latest Arduino IDE update. I googled ws2812b arduino code and saw this site and there was a code I could start to play with so I copied it and put it in Arduino IDE and changed it a bit to have the right number of lights. Then I remembered that I hadn’t set it to the right board so I searched the Boards manager for seeeduino XIAO, I saw it on the same site, it was very helpful. I installed that but there was still a error and saw there was one line I accidentally left out so I put that in and saw that that was information I did not have so I checked the site to see what library it had so I could install that as well. After that the code went through, but it fried one of the leds. I thought since the led light datasheet said “Power supply voltage VDD +3.5~+5.3 V” that I should put the pin in the 5V spot but that was apparently to much, Arnar ran to put on a new led and I tried again but just with 3V3 and everything went well.
I wanted to try changing the color so I googled the Bi flag and put in Inkscape to find out what the RGB is for the flags colors with the Pick colors from image tool and put those numbers in. I did change the numbers for the purple to make it look better.
I somehow did something to the Seeeduino XIAO so I got a Arduino UNO to continue playing with the code. My hope is to with my final project make a code where it flows from green to purple in a chaos wave. But I was not able to do that this week but I did a loop with different delays to make a semi random looking green and purple pattern.
To comunicate with the board I used this site to see how it was done and it was very simple, just add Serial.begin(9600); in void setup() and Serial.println("GREEEEEN"); in void loop().