Week 6

Embeded Programming

individual assignment

  • write a program for a microcontroller development board that you made, to interact (with local input &/or output devices) and communicate (with remote wired or wireless devices)
  • extra credit: use different languages &/or development environments
  • extra credit: connect external components to the board

Group Assignment

  • browse through the data sheet for your microcontroller
  • compare the performance and development workflows for other architectures


Programming the quentorres from week 4

first thing to do was download Arduino IDE and installing it

when we have that open we need to Add the Seed Studio Xiao RP2040 to the board manager for this you first need the URL for the Arduino-Pico by by Earlephilhower, this URL can be found by scrollign down to the instalation section of the github repository

RP2040 URL

to add this to the board manager you need to go to File->Prefferences and paste the url in the window where it says "Additional Boards Manager URL's" moard board managers can be added by putting a "," inbetween URL's

file properties

having done this you can now go to tools->Board->Raspberry Pi Pico/RP2040 and select the seed studio xiao from the list

how to select board

then you need to select a port in the tools menu the poert may differ depending on various factors so it is best to check in the device manager what port the xiao is registered as, this can be seen by imply unplugging it from the computer and plugging it back in. for me it is com-12

how to select port how to find port

now you can write your code and upload it to the xiao by hitting the upload button I personally used some code I found Herewhat this code does is light up the green LED while the button is being held, that is once i had modified the designated pins for the button and LED

changes i made to the code

this however wasn't really what I wanted so I Used Chat GPT to change the code so the Led would toggle on and off whne the button was pressed.

Gpt

this code did work altho it did also make it so that the LED blinks when the button is held, however I have decided to call this a feature not a bug. it can act as a kind of cointoss as it wil land on either on or off when the button is released.