i touched a breadboard once.

adventures of a software engineer in the land of physical objects

Week 7: Embedded Programming

Programming the Microcontroller

This is a quick-and-dirty writeup to show that I have had success in programming microntrollers - that is, it is likely to change in the immediate future. I adapted the code from here, only changing the led_pin value to PA7. In understanding the meaning of various parts of the code, I found this helpful. There is only one unexpected issue: it turns out that for whatever reason, pressing the button causes the LED to stop blinking. This is definitely not something I programmed it to do.

Figure 1: Left: It works! Right: Unfortunately, it also does this.

Addendum: The reason I did this is because the buttons is wired up slightly wrong. Instead of connecting a pin to ground when the switch is closed, it shorts VCC to ground. Mystery solved!