Values from 0 (0V) to 4095 (3.3V) – much higher resolution than Arduino Uno’s 10-bit. Experiment 3: Wi-Fi Scanning (No extra hardware) #include "WiFi.h" void setup() Serial.begin(115200); WiFi.mode(WIFI_STA); WiFi.disconnect(); delay(100); Serial.println("Scanning..."); int n = WiFi.scanNetworks(); for (int i = 0; i < n; i++) Serial.print(WiFi.SSID(i)); Serial.println(WiFi.RSSI(i));
Serial.println("Connected! IP: "); Serial.println(WiFi.localIP()); asim zulfiqar hands-on esp32 with arduino ide
List of nearby Wi-Fi networks with signal strength – confirmed ESP32’s integrated radio works perfectly. Experiment 4: Connecting to Wi-Fi and Pinging const char* ssid = "your_SSID"; const char* password = "your_PASS"; void setup() Serial.begin(115200); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) delay(500); Serial.print("."); Values from 0 (0V) to 4095 (3
void setup() Serial.begin(115200);
void loop() digitalWrite(2, HIGH); delay(1000); digitalWrite(2, LOW); delay(1000); Experiment 4: Connecting to Wi-Fi and Pinging const
ESP32 successfully obtained an IP via DHCP – ready for IoT applications. 5. Key Learnings & Troubleshooting (Asim’s Notes) | Issue | Solution | |-------|----------| | Upload fails with “A fatal error occurred: Failed to connect to ESP32” | Hold BOOT button while uploading, then release. | | Serial monitor shows garbage | Set baud rate to 115200 (ESP32 default). | | Some pins don’t work as digital output | Avoid GPIOs 6–11 (used for internal flash). | | ADC readings noisy | Use analogRead(34) with averaging or capacitor. | 6. Comparison: ESP32 vs Arduino Uno (for this hands-on) | Feature | ESP32 | Arduino Uno | |---------|-------|--------------| | Arduino IDE support | ✅ (via extra package) | ✅ (native) | | Built-in Wi-Fi | ✅ | ❌ (needs shield) | | ADC resolution | 12-bit (4096 steps) | 10-bit (1024 steps) | | Price | ~$6-10 | ~$20-25 | | Ease of upload | Slight button dance | Plug & play | 7. Conclusion & Next Steps Conclusion by Asim Zulfiqar: The ESP32 is a powerful, affordable alternative to traditional Arduino boards, fully accessible through the Arduino IDE. Within two hours of hands-on work, I was able to blink LEDs, read analog sensors, scan Wi-Fi, and connect to the internet. The learning curve is minimal for anyone familiar with Arduino, and the built-in wireless features open up immediate IoT prototyping.