- Adafruit SSD1306 128x64 I2C (4 pins), if you have a different display, change in the lines 13 and 14.
- A button.
-
WiFi:
- Change the
ssidandpasswordin lines 10 and 11.
- Change the
-
Display (optional):
- Change the
SCREEN_ADDRESSin line 13. - Change the
displayWidthanddisplayHeightin line 14.
- Change the
-
Button (optional):
- Change the
BUTTON_PINin line 16.
- Change the
Display:
- GND to GND,
- VCC to 3.3V or 5V
- SCL and SDA pins (these are defined by Wire lib):
ESP32: SDA on D21, SCL on D22;
Arduino UNO: SDA on A4, SCL on A5;
Arduino MEGA 2560: SDA on 20, SCL on 21;
Arduino LEONARDO: SDA on 2, SCL on 3;
Button: between GND and D23.