SBRDIYables
Published © CC BY

Controlling an RGB

Controlling an RGB usiing #pico

BeginnerProtip30 minutes39
Controlling an RGB

Things used in this project

Story

Read more

Schematics

Controlling an RGB

Code

Controlling an RGB

MicroPython
from machine import Pin
import time

red = Pin(15, Pin.OUT)
green = Pin(14, Pin.OUT)
blue = Pin(13, Pin.OUT)

delay_time = 1.0

leds = [red, green, blue]

while True:
    for led in leds:
        led.high()
        time.sleep(delay_time)
        led.low()
        time.sleep(delay_time)

Credits

SBR
37 projects • 52 followers
Mechanical Engineer
DIYables
1 project • 92 followers
I would like to invite you to join and add your projects to DIYables platform https://www.hackster.io/diyables

Comments