T-Camera Plus S3 Quick Start
Required Libraries
| Library | Version | Source |
|---|---|---|
| esp32-camera | Latest | GitHub |
| U8g2 | Latest | GitHub |
| XPowersLib | Latest | GitHub |
Arduino
PlatformIO (Recommended)
- Install VS Code and the PlatformIO IDE extension
- Clone the repository:bash
git clone https://github.com/Xinyuan-LilyGO/T-Camera-Plus-S3.git - Open
platformio.iniand select your example - Click ✓ to build, connect via USB-C, click → to upload
Arduino IDE
1. Install ESP32 Board Support
- Open Arduino IDE → File → Preferences
- Add to "Additional Board Manager URLs":
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - Go to Tools → Board → Boards Manager, search
esp32, install esp32 by Espressif Systems
2. Board Settings
| Setting | Value |
|---|---|
| Board | ESP32S3 Dev Module |
| Upload Speed | 921600 |
| USB CDC On Boot | Enabled |
| CPU Frequency | 240 MHz (WiFi) |
| Flash Mode | QIO 80 MHz |
| Flash Size | 16 MB (128Mb) |
| Partition Scheme | 16M Flash (3MB APP/9.9MB FATFS) |
| PSRAM | OPI PSRAM |
3. Upload
Connect via USB-C, open an example, and click Upload.
If upload fails: hold BOOT, press and release RST, then release BOOT to enter download mode.
Examples
| Example | Description |
|---|---|
CameraWebServer | Stream video over Wi-Fi via browser |
PIR_Camera | Trigger capture on PIR motion detection |
Factory | Full factory test |
Peripheral Examples
Camera (OV2640)
cpp
#include "esp_camera.h"
// T-Camera Plus S3 camera pin definitions
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 15
#define SIOD_GPIO_NUM 4
#define SIOC_GPIO_NUM 5
#define Y9_GPIO_NUM 16
#define Y8_GPIO_NUM 17
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 12
#define Y5_GPIO_NUM 10
#define Y4_GPIO_NUM 8
#define Y3_GPIO_NUM 9
#define Y2_GPIO_NUM 11
#define VSYNC_GPIO_NUM 6
#define HREF_GPIO_NUM 7
#define PCLK_GPIO_NUM 13
void setup() {
Serial.begin(115200);
camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = Y2_GPIO_NUM; config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM; config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM; config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM; config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM; config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM; config.pin_href = HREF_GPIO_NUM;
config.pin_sccb_sda = SIOD_GPIO_NUM; config.pin_sccb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM; config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.pixel_format = PIXFORMAT_JPEG;
config.frame_size = FRAMESIZE_QVGA;
config.jpeg_quality = 12;
config.fb_count = 2;
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK) {
Serial.printf("Camera init failed: 0x%x\n", err);
return;
}
Serial.println("Camera ready");
}
void loop() {
camera_fb_t *fb = esp_camera_fb_get();
if (fb) {
Serial.printf("Captured %u bytes\n", fb->len);
esp_camera_fb_return(fb);
}
delay(2000);
}OLED Display (U8g2)
cpp
#include <U8g2lib.h>
#include <Wire.h>
// 0.96-inch SSD1306 OLED I2C
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);
void setup() {
u8g2.begin();
}
void loop() {
u8g2.clearBuffer();
u8g2.setFont(u8g2_font_ncenB08_tr);
u8g2.drawStr(10, 30, "T-Camera Plus");
u8g2.sendBuffer();
delay(1000);
}FAQ
Q: Upload keeps failing?
A: Hold BOOT, press and release RST, then release BOOT to enter download mode.
Q: What is the difference from T-Camera S3?
A: T-Camera Plus S3 adds a battery management unit (IP5306 PMU) and a larger battery connector compared to the standard T-Camera S3.
Q: Camera init failed?
A: Verify PSRAM is set to OPI PSRAM in Arduino IDE settings. Also confirm the correct camera pin definitions for your board.
