LED Blink on Raspberry Pi pico microcontroller

preview_player
Показать описание
Kitflix has currently more than 5000 students from 150+ countries. We’re slowly progressing towards becoming a community of like minded people who love to experiment on embedded systems, IoT and all things electronics and coding.

Please join kitflix by enrolling to any one of free courses mentioned below

In the previous video of this playlist, we've seen how to install micropython firmware on raspberry pi pico microcontroller. In this program we'll get started with hardware interfacing programs on raspberry pi pico microcontroller. This video is about led intefacing with raspebrry pi microcontroller.
These videos are intended as starting point in their learning journey.

Thank you for watching the video
If you like our work, please support us by purchasing a full course from us at

they're affordable and super helpful

We also love helping you in solving any of your problems and issues, feel free to reach out to us for any guidance, consultation or to simply connect with us

Рекомендации по теме
Комментарии
Автор

can you help because it says that led is not defined and it says machine is no module

JayGames-ir
Автор

Nice tutorial. Good for those of us getting started with the Pico.

edwardk
Автор

Great job waiting for your PIC Tutorials like 8051. God bless you keep it up

moinudhinhasanmestri
Автор

Thank you very much for this I was getting a little bit stuck between setting app thonny on a New Linux setup, not working too well, this really helped. Thank you

danieldare
Автор

NIce tutorial. can u please do next video on how to delete previous commands, and try LED with wires Thank you!!!

guujikenn
Автор

Dear sir, please send link of first video of raspberry pi pico

ashutoshgupta
Автор

How to turn off the blinking led ? Please say

musicaddict
Автор

To keep it simple and step by step you should have first started by just turning on the LED on the Pico with the following code

from machine import Pin
led = Pin(25, Pin.OUT)
led.on()

This works with the Pico H but not the Pico W or WH 2022 because they no longer use pin 25 for the LED but all you have to do is replace 25 with "LED" as follows

from machine import Pin
led = Pin("LED", Pin.OUT)
led.on()


Alternative code For Pico


import machine
import utime
led = machine.Pin(25, machine.Pin.OUT)
led.value(1)


OR for Pico W

import machine
import utime
led = machine.Pin("LED", machine.Pin.OUT)
led.value(1)




If you change the last line in the above code
led.on() to led.toggle () then the led will change from on to off or off to on everytime you click the run button in the Thonny program




Once you have done this you can go onto the next step which is to make the Pico blink.
For Pico H use the code in this video

import machine
import utime
led = machine.Pin(25, machine.Pin.OUT)
while True:
led.value(1)
utime.sleep(1)
led.value(0)
utime.sleep(1)


For Pico W or WH use the following code - just change 25 to "LED" as before

import machine
import utime
led = machine.Pin("LED", machine.Pin.OUT)
while True:
led.value(1)
utime.sleep(1)
led.value(0)
utime.sleep(1)


dropdeadfredd
visit shbcf.ru