// Cambridge, MA

week 10: output devices

this week's assignment was to add an output device to a microcontroller board of my design, and to program it to do something.
picking up from where i left off last week (successfully reading temperature from an NTC thermistor), this week my goal was to use the same board and print that temperature onto an OLED screen.
when soldering last week, i damaged a trace on my board (the one going to the SDA pin from the OLED)
i attempted to do surgery by attaching a small piece of wire from the pin to where the trace restarted:
i had written my code for reading temperature in Arduino, so I wanted to see if there was a way to use that same code for the OLED rather than restarting in micropython. i found the Adafruit_SSD1306 library for programming the 128x64 pixel display the REEF had in stock, and wrote some code to test it.
however, the code wouldn't run. i tried a variety of debugging strategies and suspected that it may be a hardware issue.
the roland was free, so i decided just to re-mill my board and start over. zero bits broken this time!
i soldered the components onto the new board; this was my third time soldering and it's definitely coming more naturally.
i plugged the OLED into the connector, but it still didn't work. i went back to the schematic and realized i had made a silly mistake: for some reason, i had the pins for the OLED in the wrong order. i had been using the board like this:
but i needed to connect it like this--it threw my (admittedly not great to start with) design off, but it worked!
i used my temperature reading code from last week, and after some trial and error, got the OLED to display temperature.
putting my thumb on the thermistor increases the temperature reading, which seemed exceedingly logical.
all in all, a successful week! i was able to accomplish troubleshooting, milling a PCD, soldering, and embedded programming with no outside help this week which is a first. time to step up the difficulty and take on some more challenges :-)