summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2026-01-15 09:08:54 +0100
committerYuval Adam <_@yuv.al>2026-01-15 09:08:54 +0100
commitfd7c017a6fab43eb1e6fbc39a36b716359a4dc29 (patch)
treeefd1b38ed2a0054fe4c1bbbcab6a32c64306e5c6
Initial test setup
-rw-r--r--README.md40
-rw-r--r--hello-t-energy-s3.ino21
2 files changed, 61 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5abe2c1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,40 @@
+# hello-t-energy-s3
+
+Minimal test sketch for LilyGo T-Energy-S3 board.
+
+## Setup (one-time)
+
+```bash
+# Add ESP32 board manager
+arduino-cli config init
+arduino-cli config add board_manager.additional_urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
+
+# Install ESP32 core
+arduino-cli core update-index
+arduino-cli core install esp32:esp32
+```
+
+## Build & Upload
+
+```bash
+# Find your port
+arduino-cli board list
+
+# Compile
+arduino-cli compile --fqbn "esp32:esp32:esp32s3:CDCOnBoot=cdc,FlashSize=16M,PSRAM=opi" .
+
+# Upload (replace /dev/ttyACM0 with your port)
+arduino-cli upload --fqbn "esp32:esp32:esp32s3:CDCOnBoot=cdc,FlashSize=16M,PSRAM=opi" --port /dev/ttyACM0 .
+
+# Monitor
+arduino-cli monitor --port /dev/ttyACM0 --config baudrate=115200
+```
+
+## Expected Output
+
+```
+Hello T-Energy-S3!
+Battery: 4200 mV
+Battery: 4200 mV
+...
+```
diff --git a/hello-t-energy-s3.ino b/hello-t-energy-s3.ino
new file mode 100644
index 0000000..fd0a05d
--- /dev/null
+++ b/hello-t-energy-s3.ino
@@ -0,0 +1,21 @@
+// Minimal T-Energy-S3 test
+// Reads battery voltage and prints to USB serial
+
+#define BATTERY_PIN 3
+
+void setup() {
+ Serial.begin(115200);
+ delay(2000); // Wait for USB CDC to initialize
+
+ Serial.println("Hello T-Energy-S3!");
+
+ pinMode(BATTERY_PIN, INPUT);
+ analogReadResolution(12);
+ analogSetPinAttenuation(BATTERY_PIN, ADC_11db);
+}
+
+void loop() {
+ int mv = analogReadMilliVolts(BATTERY_PIN) * 2; // Voltage divider on board
+ Serial.printf("Battery: %d mV\n", mv);
+ delay(2000);
+}