- WeMoS D1 Mini Clone (purchase on AliExpress marked as "Mini ESP8266")

- OLED Module (purchase on AliExpress marked as "GM009605")

Note: The "SCK" Pin maps to I2C "SCL"
- 2x 10k Ohm 5% Resistors as Pull Up

The ESP2866 doesn't actually have any hardware I2C pins – those labeled on the Thing are the default, but you can actually use any two pins as SDA and SCL. Calling Wire.begin()
will assume pins 2 and 14 are SDA and SCL, but you can manually set them to any other pin by calling
Wire.begin([SDA], [SCL]).
(ref: Sparkfun: "Libraries Available/Not Available and the Differences")
- Arduino IDE v1.6.10 (see the Sparkfun guide on how to enable ESP8266 support in the IDE)
- Download and install the Adafruit_SSD1306 and Adafruit_GFX libraries
- Updated ssd1306_128x64_i2c example sketch (available once the Adafruit_SSD1306 library is installed and running)
-
Navigate to where the Adafruit_SSD1306.h (On Windows 10: C:\Users[username]\Documents\Arduino\libraries)
-
Locate the following code and update as outlined to avoid the Arduino IDE error "#error("Height incorrect, please fix Adafruit_SSD1306.h!")";
//#define SSD1306_128_64 #define SSD1306_128_32 // #define SSD1306_96_16
to:
```C++
#define SSD1306_128_64
//#define SSD1306_128_32
// #define SSD1306_96_16
```
- Save and close the Adafruit_SSD1306.h file
```C++
#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif
```
to:
```C++
#define SSD1306_LCDHEIGHT 64
#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif
```
-
Update the code snippet as follows;
Wire.begin(); Serial.begin(9600);
to:
```C++
Wire.begin(D1,D3); // sda, scl
Serial.begin(57600);
```
-
Update the code snippet as follows to change the address for the OLED display from 0x3D to 0x3C;
display.begin(SSD1306_SWITCHCAPVCC, 0x3D); // initialize with the I2C addr 0x3D (for the 128x64)
to:
```C++
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3C (for the 128x64)
```
