9. Output devices

This week's assignment was to add an output device to a microcontroller board I've designed, and program it to do something

Group assignment

This week's group assignment was to calculate the power consumption of our input device. I used an OLED SSD1306 .096. Researching its datasheet I gather the following data: For VDD it consumes 1.65V to 3.3V for IC logic, and for VCC it consumes 7V to 15V for Panel driving. Here's the datasheet in order for anyone interested in seeing this or more features and details. OLEDSSD1306 datasheet

How did I program the OLED screen?

It was the first time I had ever programmed an OLED screen so it was an interesting learning process. The first thing I noticed was that it didn't have pins, I had to get some and soldered them to it.

Then I just connected each pin in the OLED screen to the corresponding pin in my PCB. All that was left was to program it, I looked up tutorials in order to see how the OLED worked. The first thing I did was to make a simple program that printed on the screen "Helo world".This video by Nuevas Tecnologias JA helped me a lot. (its in spanish) Tutorial

Code for "Hellow World" (Arduino)

Code "Hello World"

After learning how to add text to the OLED screen I decided to add an image next to the text. I had some trouble with this becuse there are diferent ways to add images, I also didn't now how to use the "map of the images so taht they would appear on the screen. Luckily I was able to find a tutorial, by Mision Critical, that helped me add images: Images tutorial

There I uploaded my image, adjusted its size, chose the background color, adjusted its brightness, scaled it to preserve its dimensions and converted the image to a cpp file.

After that just copy the code from the image and add it to my final code.

Final code

Final Code

Final Result