← Back

Activity 1.2 External LED 1


Instructions

Setup

  1. In your projects folder, create a new python file named 1-2-external-led-1.py.

Circuit

Circuit Diagram

No circuit diagram associated with this activity.

Circuit Build

Code

from machine import Pin
from utime import sleep

led = Pin(2, Pin.OUT)

while True:
    led.value(1)
    sleep(1)
    led.value(0)
    sleep(1)

Debug

INSERT