Skip to content

Instantly share code, notes, and snippets.

@gabonator
Last active August 21, 2023 18:41
Show Gist options
  • Save gabonator/402e09eb1b5afce1e7be228483138071 to your computer and use it in GitHub Desktop.
Save gabonator/402e09eb1b5afce1e7be228483138071 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);
}
@gabonator
Copy link
Author

gabonator commented Jun 7, 2018

Windows installation: https://github.com/espressif/arduino-esp32/blob/master/docs/arduino-ide/windows.md
CP210x windows driver: https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
Board: ESP32 Dev Module
Delete \Program Files (x86)\Arduino\libraries\Wifi\ folder, because it conflicts with ESP32 Wifi implementation (\Documents\Arduino\hardware\espressif\arduino-esp32\libraries\WiFi\src\WiFi.h)

@romax1407
Copy link

ttgo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment