#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 display (128,64,&Wire,-1); //-1 means the reset pin is not connected
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
if (!display.begin(SSD1306_SWITCHCAPVCC, 0X3c))
{
Serial.println("display not found");
while(1);
}
display.clearDisplay();
display.display();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(10,10);
display.println("Hello");
display.startscrollleft(0x00,0x07);
display.display();
delay(2000);
display.clearDisplay();
display.stopscroll();
display.drawLine(20,5,50,40,WHITE);
display.display();
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}