This blog is a record of what I do, what I think and what I read. If you are interested to know about my professional experience, you can refer to the other blog of mine. http://admi2camac.blogspot.com/
Saturday, 4 March 2023
TTB04: Create a Binary Counter Using the Pico W
from machine import Pin
from time import sleep
led1 = Pin(15, Pin.OUT)
led2 = Pin(14, Pin.OUT)
led3 = Pin(13, Pin.OUT)
led4 = Pin(12, Pin.OUT)
while True:
led1.value(0)
led2.value(0)
led3.value(0)
led4.value(0)
sleep(.5)
led1.value(0)
led2.value(0)
led3.value(0)
led4.value(1)
sleep(.5)
led1.value(0)
led2.value(0)
led3.value(1)
led4.value(0)
sleep(.5)
led1.value(0)
led2.value(0)
led3.value(1)
led4.value(1)
sleep(.5)
led1.value(0)
led2.value(1)
led3.value(0)
led4.value(0)
sleep(.5)
led1.value(0)
led2.value(1)
led3.value(0)
led4.value(1)
sleep(.5)
led1.value(0)
led2.value(1)
led3.value(1)
led4.value(0)
sleep(.5)
led1.value(0)
led2.value(1)
led3.value(1)
led4.value(1)
sleep(.5)
led1.value(1)
led2.value(0)
led3.value(0)
led4.value(0)
sleep(.5)
led1.value(1)
led2.value(0)
led3.value(0)
led4.value(1)
sleep(.5)
led1.value(1)
led2.value(0)
led3.value(1)
led4.value(0)
sleep(.5)
led1.value(1)
led2.value(0)
led3.value(1)
led4.value(1)
sleep(.5)
led1.value(1)
led2.value(1)
led3.value(0)
led4.value(0)
sleep(.5)
led1.value(1)
led2.value(1)
led3.value(0)
led4.value(1)
sleep(.5)
led1.value(1)
led2.value(1)
led3.value(1)
led4.value(0)
sleep(.5)
led1.value(1)
led2.value(1)
led3.value(1)
led4.value(1)
sleep(.5)
https://www.youtube.com/watch?v=P1dzHNgAtvg&list=PLGs0VKk2DiYz8js1SJog21cDhkBqyAhC5&index=4
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment