#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 OLED(-1);
int x;
void setup() {
OLED.begin(SSD1306_SWITCHCAPVCC,0x3C); // initialize with the I2C addr 0x3C (for the 128x64)
}
void loop(){
OLED.clearDisplay();
OLED.setTextColor(WHITE,BLACK); //Text is white ,background is black
OLED.setCursor(0, 0);
OLED.setTextSize(2);
OLED.println("IOT");
OLED.setTextSize(1);
OLED.print("Laboratory");
OLED.println(" 2016");
OLED.setTextColor(BLACK,WHITE); // 'inverted' text
OLED.print("www.praphas.com");
OLED.setTextColor(WHITE,BLACK); // 'inverted' text again
OLED.setCursor(60,0);
OLED.setTextSize(2);
OLED.println(x,DEC);
OLED.display();
x++;
delay(250);
}
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RESET -1 // -1 sharing Arduino reset pin)
Adafruit_SSD1306 OLED(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 OLED(4);
int x;
void setup() {
OLED.begin(SSD1306_SWITCHCAPVCC,0x3C); //initialize I2C addr 0x3c
}
void loop(){
OLED.clearDisplay();
OLED.setTextColor(WHITE,BLACK);
OLED.drawRect(10,10, 100,40,WHITE);
OLED.drawLine(0, 63, 127, 0, WHITE);
OLED.drawCircle(110, 50, 12, WHITE);
OLED.fillCircle(45, 50, 8, WHITE);
OLED.drawTriangle(70, 60, 90, 60, 80, 46, WHITE);
OLED.fillRect(15,15,20,20,WHITE);
OLED.fillRoundRect(50,15,50,20,10,WHITE);
OLED.setCursor(5,30);
OLED.setTextSize(1);
OLED.println("www.praphas.com");
OLED.display(); //
delay(250);
}
FreeMono12pt7b.h FreeSansBoldOblique12pt7b.h
FreeMono18pt7b.h FreeSansBoldOblique18pt7b.h
FreeMono24pt7b.h FreeSansBoldOblique24pt7b.h
FreeMono9pt7b.h FreeSansBoldOblique9pt7b.h
FreeMonoBold12pt7b.h FreeSansOblique12pt7b.h
FreeMonoBold18pt7b.h FreeSansOblique18pt7b.h
FreeMonoBold24pt7b.h FreeSansOblique24pt7b.h
FreeMonoBold9pt7b.h FreeSansOblique9pt7b.h
FreeMonoBoldOblique12pt7b.h FreeSerif12pt7b.h
FreeMonoBoldOblique18pt7b.h FreeSerif18pt7b.h
FreeMonoBoldOblique24pt7b.h FreeSerif24pt7b.h
FreeMonoBoldOblique9pt7b.h FreeSerif9pt7b.h
FreeMonoOblique12pt7b.h FreeSerifBold12pt7b.h
FreeMonoOblique18pt7b.h FreeSerifBold18pt7b.h
FreeMonoOblique24pt7b.h FreeSerifBold24pt7b.h
FreeMonoOblique9pt7b.h FreeSerifBold9pt7b.h
FreeSans12pt7b.h FreeSerifBoldItalic12pt7b.h
FreeSans18pt7b.h FreeSerifBoldItalic18pt7b.h
FreeSans24pt7b.h FreeSerifBoldItalic24pt7b.h
FreeSans9pt7b.h FreeSerifBoldItalic9pt7b.h
FreeSansBold12pt7b.h FreeSerifItalic12pt7b.h
FreeSansBold18pt7b.h FreeSerifItalic18pt7b.h
FreeSansBold24pt7b.h FreeSerifItalic24pt7b.h
FreeSansBold9pt7b.h FreeSerifItalic9pt7b.h
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Fonts/FreeMonoBold9pt7b.h> //include font MonoBold size 9pt7b
Adafruit_SSD1306 OLED(-1);
void setup() {
OLED.setFont(&FreeMonoBold9pt7b); // Use font from file include
OLED.begin(SSD1306_SWITCHCAPVCC,0x3C); // initialize with the I2C addr 0x3C (for the 128x64)
}
void loop(){
OLED.clearDisplay();
OLED.setTextColor(WHITE,BLACK); //Text is white ,background is black
OLED.setCursor(0,20);
OLED.setTextSize(1);
OLED.println("Change font");
OLED.setCursor(0,50);
OLED.print("OLED 128x64");
OLED.display(); //
delay(250);
}