// Source code from https://techatronic.com/oled-display-with-arduino-ssd1306-oled
// TECHATRONIC.COM
// Library SPI.h
// https://github.com/PaulStoffregen/SPI
// Library Adafruit_GFX.h
// https://github.com/adafruit/Adafruit-GFX-Library
// Library Adafruit_SSD1306.h
// https://github.com/adafruit/Adafruit_SSD1306
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define screen_width 128 // OLED display width, in pixels
#define screen_height 64 // OLED display height, in pixels
#define OLED_RESET 4
Adafruit_SSD1306 display(screen_width, screen_height);
void setup ()
{
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
}
void loop ()
{
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
display.setCursor(0, 0);
display.print("HELO FRIEND");
display.setCursor(0, 30);
display.print("TECHATRONIC.COM");
display.display();
}