Skip to content

Instantly share code, notes, and snippets.

@mountaindude
Forked from gabonator/esp32_oled_wifi.md
Created May 8, 2020 03:20
Show Gist options
  • Save mountaindude/8891b8aeab1ad0b0e6fa1a18fb49df5b to your computer and use it in GitHub Desktop.
Save mountaindude/8891b8aeab1ad0b0e6fa1a18fb49df5b to your computer and use it in GitHub Desktop.
esp32 TTGO arduino compatible board with 128x64 pixel oled display and Wifi

esp32 TTGO arduino compatible board with 128x64 pixel oled display and Wifi

Front Back Pinout

Device description on banggood

  1. The main control chip using Le Xin ESP32, Tensilica LX6 dual core processor, clocked at 240MHz, computing capacity of up to 600DMIPS, 520 SRAM, 802.11 KB chip b/g/n HT40 Wi-Fi transceiver, baseband, and LWIP protocol stack, Bluetooth (Bluetooth dual-mode integrated traditional and BLE low-power Bluetooth).
  2. onboard 16 Mt bytes (128 Mt bit), Flash, and Wi-Fi antennas
  3. 0.96 inch White OLED display
  4. lithium battery charging circuit and interface
  5. CP2102 USB to serial chip, perfect support for Arduino development environment

PCB characteristics

poor rf design, display holding screws too near to wifi antenna (one of them is touching it)

Development tools

  • board support: arduino-esp32
  • oled display: ESP8266 and ESP32 Oled Driver for SSD1306 display (directly available from arduino's library manager)
    • SDA = pin 4, SCL = pin 15, RESET = pin 16
    • initialize device:
    SSD1306 display(0x3c, 4, 15);
    • pulse RESET signal, or keep it high during startup:
    pinMode(16, OUTPUT); 
    digitalWrite(16, 1); 
  • internal led is on pin 2

LED blink sample code

#define LED 2

void setup()
{
  pinMode(LED, OUTPUT);
}

void loop()
{
  digitalWrite(LED, 1);
  delay(1000);
  digitalWrite(LED, 0);
  delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment