ICT 360: Introduction to IoT
Mr. Seng Theara
Install Thonny IDE
Power Supply
Choose based on your OS
ESP32 Setup
Plug ESP32 into your LaptopĀ
Then
Setup Micropython with ESP32 on Thonny
Testing the Code with ESP32 on Thonny
from machine import Pin
import time
# Create LED object on GPIO 2
led = Pin(2, Pin.OUT)
while True:
led.on() # Turn LED ON
print("LED ON")
time.sleep(2) # Wait 2 seconds
led.off() # Turn LED OFF
print("LED OFF")
time.sleep(2) # Wait 2 seconds
Testing