You are on page 1of 1

#include <ESP8266WiFi.

h>
#include <ESP8266HTTPClient.h> // http web access library
#include <ArduinoJson.h> // JSON decoding library

// Libraries for SSD1306 OLED display


#include <Wire.h> // include wire library (for I2C devices such as the
SSD1306 display)
#include <Adafruit_GFX.h> // include Adafruit graphics library
#include <Adafruit_SSD1306.h> // include Adafruit SSD1306 OLED display driver
#define OLED_RESET 5 // define SSD1306 OLED reset at ESP8266 GPIO5 (NodeMCU
D1)
Adafruit_SSD1306 display(OLED_RESET);

// set Wi-Fi SSID and password


const char* ssid = "CompSuppSchapenbout";
const char* password = "46Schapenbout1961";

SETUP
VOID-------------------------------------------------------------------------------
-------------

---i2c oled----
Wire.begin(4, 0); // set I2C pins [SDA = GPIO4 (D2), SCL = GPIO0 (D3)],
default clock is 100kHz
Wire.setClock(400000L); // set I2C clock to 400kHz
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D
(for the 128x64)

You might also like