#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>
#include <Wire.h>
#include "DisplayLcd.h"
#include "EncoderSw.h"
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32
#define CLK 2
#define DT 3
#define SW 4
int n;
Adafruit_SSD1306 screen(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire);
DisplayLcd myDisplay(&screen);
EncoderSw myEnc(CLK, DT, SW);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
//myDisplay.prepare();
myEnc.begin();
}
void loop() {
// put your main code here, to run repeatedly:
n = myEnc.read();
//myDisplay.visualizza(n);
Serial.println(n);
delay(10);
}