/* * ============================================================ * Tishvi ESP32 (30-pin / 38-pin) — Getting Started Sketch * guide.tishvi.com * ============================================================ * Works on both Tishvi ESP32 variants: * ● 30-pin (15 pins per side) * ● 38-pin (19 pins per side) * * What this sketch does: * 1. Prints chip information to Serial Monitor * 2. Scans for nearby WiFi networks and lists them * 3. Blinks the built-in LED (GPIO 2) every 500 ms * * ⚠ IMPORTANT: * Open Serial Monitor at 115200 baud (NOT 9600 like Arduino UNO) * * Board settings in Arduino IDE: * Board : ESP32 Dev Module * Upload Speed: 921600 * Port : Your COM port (Windows) or /dev/ttyUSBx (Linux/macOS) * * No external libraries needed — WiFi.h is included with the * ESP32 board package from Espressif. * ============================================================ */ #include // ── Pin Definitions ────────────────────────────────────────── const int LED_PIN = 2; // Built-in LED — GPIO 2 on most ESP32 boards // If your LED does not blink, try GPIO 13 void printChipInfo() { Serial.println("========================================"); Serial.println(" Tishvi ESP32 — Getting Started"); Serial.println("========================================"); Serial.printf(" Chip Model : %s\n", ESP.getChipModel()); Serial.printf(" Chip Revision: v%d.%d\n", ESP.getChipRevision() / 100, ESP.getChipRevision() % 100); Serial.printf(" CPU Cores : %d\n", ESP.getChipCores()); Serial.printf(" CPU Frequency: %d MHz\n", ESP.getCpuFreqMHz()); Serial.printf(" Flash Size : %d MB\n", ESP.getFlashChipSize() / (1024 * 1024)); Serial.printf(" Free Heap : %d bytes\n", ESP.getFreeHeap()); Serial.printf(" MAC Address : %s\n", WiFi.macAddress().c_str()); Serial.println("========================================"); Serial.println(); } void scanWiFi() { Serial.println("Scanning for WiFi networks..."); WiFi.mode(WIFI_STA); WiFi.disconnect(); delay(100); int n = WiFi.scanNetworks(); // Blocks until scan is complete if (n == 0) { Serial.println("No networks found. Check antenna is intact."); } else { Serial.printf("%d network(s) found:\n\n", n); for (int i = 0; i < n; i++) { Serial.printf(" %2d. %-32s Signal: %4d dBm %s\n", i + 1, WiFi.SSID(i).c_str(), WiFi.RSSI(i), (WiFi.encryptionType(i) == WIFI_AUTH_OPEN) ? "[Open]" : "[Secured]" ); delay(10); } } Serial.println(); WiFi.scanDelete(); // Free scan memory } void setup() { Serial.begin(115200); // ⚠ ESP32 uses 115200, not 9600 delay(500); pinMode(LED_PIN, OUTPUT); // Print chip info and scan WiFi once at startup printChipInfo(); scanWiFi(); Serial.println("Built-in LED (GPIO 2) will now blink every 500 ms."); Serial.println("If no blink: check LED_PIN at top of sketch."); } void loop() { // ── Blink built-in LED ─────────────────────────────────── digitalWrite(LED_PIN, HIGH); delay(500); digitalWrite(LED_PIN, LOW); delay(500); }