// 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();
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter