A simple OLED display project for the UPDI microcontroller. The microcontroller used in this project is the ATTINY816, but a different one can be used. It uses the Tiny4kOLED library. Install the library before use. Alternatively, copy it to the directory ..\Documents\Arduino\library\ along with the megaTinyCore hardware package.

Create a new megaTinyCore project, 
configure its settings and paste the code from the attached .ino file. 
Compile and upload it to the microcontroller.

Connecting the ATTINY816 chip:
1 – VCC (np. +5 V)
10 -  SDA (I2C) for the OLED display's SDA
11 -  SDA (I2C) for the OLED display's SDA
16 - UPDI for the UPDI programmer
20 – GND


Connecting an OLED LCD display, e.g. 128×32 pixels (0.91 inches) or 126×64 (0.96 inches), e.g. the SSD1306.
1 - GND 
2 - VCC 
3 - SCK Microcontroller SCL (I2C) 
4 - SDA Microcontroller SDA (I2C)

The Tiny4kOLED library includes many other features that you can make use of. The display project is significantly smaller than when using the Adafruit_SSD1306 library. This allows you to use microcontrollers with less FLASH memory. Set the microcontroller to the 16 MHz internal clock (though this is not essential). It can be used with Arduino or Eclipse and the MegaTinyCore hardware package for ATTINY UPDI microcontrollers.

