#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
int LightRaw = 0;
void setup() {
// put your setup code here, to run once:
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
pinMode(12, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
//digitalWrite(12,HIGH);
//delay(300);
//digitalWrite(12,LOW);
//delay(300);
//LightRaw = analogRead(0);
//if(LightRaw<500)digitalWrite(12,HIGH);
//else
//digitalWrite(12,LOW);
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
//display.setCursor(2,2);
display.print("LightRaw:");
display.println(LightRaw);
}