Header per I2C display

PHOTO EMBED

Thu Mar 11 2021 13:28:28 GMT+0000 (UTC)

Saved by @simonetomaselli #arduino #i2c #sh1106 #ssd1306

// collegamenti oled I2C
// pin lcd denominazione pin Arduino NANO
// 1 VSS ==> 0V
// 2 VCC ==> +5V
// 3 SDA ==> A4
// 4 SCL ==> A5

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SH1106.h>
#define OLED_RESET 4
Adafruit_SH1106 display(OLED_RESET);

#if (SH1106_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SH1106.h!");
#endif

void setup() {
Serial.begin(9600);
display.begin(SH1106_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
content_copyCOPY