'F' → Fullscreen
Create a new MicroPython program named 2-4-launch-countdown.
All three sit next to each other in the block of eight pins on the top header, but the board prints them right to left — reading along that block you will find 30, then 29, then 28:
The circuit diagram below is a schematic, not a picture of the board, so its pins are drawn in the order that makes the wiring clearest rather than the order they appear above.
from machine import Pinimport time
led1 = Pin(28, Pin.OUT)led2 = Pin(29, Pin.OUT)led3 = Pin(30, Pin.OUT)
led1.value(1)time.sleep(1)led2.value(1)time.sleep(1)led3.value(1)time.sleep(1)from machine import Pinimport time
led1 = Pin(28, Pin.OUT)led2 = Pin(29, Pin.OUT)led3 = Pin(30, Pin.OUT)
led1.value(1)time.sleep(1)led2.value(1)time.sleep(1)led3.value(1)time.sleep(1)
for i in range(5): led1.value(0) led2.value(0) led3.value(0) time.sleep(0.2) led1.value(1) led2.value(1) led3.value(1) time.sleep(0.2)
led1.value(0)led2.value(0)led3.value(0)while True: so it repeats continuously as a standing demo.When you run your script:
Answer the following questions before submitting your work.
for i in range(5):, what is the loop actually controlling, since i itself is never used or printed?Pin() object pattern from Activity 2.3, just applied to three pins instead of one?Submit the required files to the appropriate dropbox.