Week 7 - Embedded Programming

Program your board to do something

(Image 1) This is a video of the LED on my board blinking

Note from Author

Similar to week 5, this is a reaccount of what happened this week because I could not update my website at the time. I wasn't sick this time around, but instead my computer fantastically broke. More specifically, I somehow corrupted my disk and couldn't even login. Anyways this was a huge time sink because I had to take about a week to get my computer into a semi-working state. As a result, I could not dedicate my time to programming an advanced project, especially one that would likely have no bearing on my final project. As a computer scientist, I feel fairly proficient at programming so I felt that not spending too much time on this week also made sense.

Plan

(Image 2) This is my arduino IDE showcasing a successful compilation of the example blink sketch to my board

The plan is simple. Use my board from week 5 and program the LED to turn on. From my understanding, to get code on a board you have 2 methods 1) bootloader 2) programmer board (board that programs another board). I chose method 1 because it was the most straightforward. I received a bootloader from Anthony when testing my week 5 board and so I just needed to ocnfigure Ardunio to be able to talk to my D11C. To enable the latter I followed these install instructions for the core required to talk to the D11C (there was a slight delay because the server went down but it was only for like a day).

The install was straightforward and afterwards I uploaded the example blink sketch to see if my LED would turn on. Unforunately, it did not. There were a few options here that I immediately saw 1) My computer is not reading the usb correctly (this is actually fairly common on Linux) 2) My sketch is wrong. Turns out the latter was true and I needed to change the pinout of the LED to match my LED placement on my PCB, but there was another option I didn't even consider.

Now my biggest tip for this week is to remember that a usb is directional. Yep, I didn't and for the longest time I thought my board wasn't being read correctly or I didn't install the Arduino core correctly to read my D11C. So after much debugging I came to OH after exhausting "all" possibilities, and then Anthony said "have you tried flipping it?" When it worked, I nearly flipped but then I was filled with joy. All is well that ends well.