
# Positioning the Board
The antenna must face the power switch side, and the USB port must face the battery plug side. Incorrect orientation will damage your ESP32 board.
# Manual Uploading Mode

The screenshot indicates that your ESP32-C3 is not in download/bootloader mode. The following manual sequence forces the ESP32-C3 into ROM serial bootloader mode reliably.
Most ESP32 dev boards have two buttons: **BOOT** (or IO0/Flash) and **EN** (or RESET).
- Hold **BOOT** first.
- Press and release **EN**.
- Wait 1–2 seconds (or until upload starts / "Connecting..." appears).
- Release **BOOT**.
After upload finishes, press **EN** (RESET) once to run your new code.
# Excessive WiFi TX Power
Default TX power (up to 20 dBm) overloads the board's weak RF section, causing instability.
Fails during authentication/handshake; works sporadically or only at very close range.
``` cpp
WiFi.begin(ssid, password);
WiFi.setTxPower(WIFI_POWER_8_5dBm); // Add this line
```
# I2C
The built-in OLED display on this ESP32-C3 board uses the following fixed I²C pins:
- **SCL** → GPIO **6**
- **SDA** → GPIO **5**
You must manually specify these pins in your code when using the Wire library.
The following code is the classic I²C scanner sketch to detect all devices on the bus. Since the OLED is connected, you should see its address appear:
``` cpp
#include <Wire.h>
#define SCL 6
#define SDA 5
void setup() {
Serial.begin(115200);
while (!Serial) {
; // Wait for serial port to connect
}
// Initialize I2C with default pins for ESP32-C3 (SDA: GPIO 5, SCL: GPIO 4)
Wire.begin(SDA, SCL);
Serial.println("\nI2C Scanner");
}
void loop() {
byte error, address;
int deviceCount = 0;
Serial.println("Scanning I2C bus...");
// Scan addresses from 1 to 127
for (address = 1; address < 128; address++) {
Wire.beginTransmission(address);
error = Wire.endTransmission();
if (error == 0) {
Serial.print("I2C device found at address 0x");
if (address < 16) Serial.print("0");
Serial.print(address, HEX);
Serial.println();
deviceCount++;
}
else if (error == 4) {
Serial.print("Unknown error at address 0x");
if (address < 16) Serial.print("0");
Serial.println(address, HEX);
}
}
if (deviceCount == 0) {
Serial.println("No I2C devices found");
} else {
Serial.print("Found ");
Serial.print(deviceCount);
Serial.println(" device(s)");
}
Serial.println("-------------------");
delay(5000); // Wait 5 seconds before next scan
}
```
``` bash
-------------------
Scanning I2C bus...
I2C device found at address 0x3C
Found 1 device(s)
```
# OLED
```cpp
#include <Arduino.h>
#include <U8g2lib.h>
#define SCK 6
#define SDA 5
U8G2_SSD1306_72X40_ER_F_SW_I2C u8g2(U8G2_R0, SCK, SDA);
void setup() {
u8g2.begin();
u8g2.clearBuffer();
u8g2.setFont(u8g2_font_6x10_tf);
u8g2.drawStr(0, 10, "LONELY BINARY");
u8g2.sendBuffer();
}
void loop() {}
```
# Battery
The expansion board includes **built-in LiPo charging circuitry**. Always use a **3.7V LiPo battery** (nominal voltage; charges to 4.2V max) that has a **built-in protection circuit** (PCM/BMS for over-charge, over-discharge, short-circuit, etc.). Compatible examples: any standard 3.7V LiPo pouch cell or protected **18650** cell.
**Connector type**: JST **PH 2.0 mm** pitch (2-pin)
All the expansion boards use **A standard** polarity on their PH 2.0 battery connector:
**Left pin** = **Negative (-)**
**Right pin** = **Positive (+)**
Always verify polarity with a multimeter before first power-up. Incorrect wiring can destroy the ESP32-C3, battery, or both.
- Choosing a selection results in a full page refresh.