Oled - mcworkshop

MC   WORKSHOP
Vai ai contenuti

Menu principale:

Oled

Technical Pages
Adafruit SSD1306 display

clic to enlarge

Electrical connection
GND to GND
VCC to +5
SDL to SDL
SDA to SDA



//This example code is in the public domain.
//27-11-2019
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 display(128, 32,&Wire, 4);
void setup() {
 if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
 while(true);
 }
 display.display();
 display.clearDisplay();
}
void loop(){
  display.display();
  display.clearDisplay();
  display.setTextSize(2);
  display.setTextColor(WHITE);
  display.setCursor(1,1);
  display.print("xxxx");
   display.setCursor(1,16);
   display.print("xxxx");
}
 
Copyright 2015. All rights reserved.
Torna ai contenuti | Torna al menu