Control RGB LED with Raspberry Pi Pico | MicroPython Tutorial on Wokwi
🔴🟢🔵 Welcome to Episode 3 of our Raspberry Pi Pico with MicroPython on Wokwi series! In this video, you'll learn how to connect and control an RGB LED using Raspberry Pi Pico with MicroPython, all simulated on Wokwi — no hardware required! We’ll guide you step-by-step through: RGB LED wiring and working Code explanation in MicroPython Simulating color mixing and LED control How to simulate it live on Wokwi 💡 Whether you're a beginner or exploring new IoT projects, this RGB LED tutorial will add color to your MicroPython journey! #RaspberryPiPico #RGBLED #MicroPython #Wokwi #RPiPico #LEDProjects #IoTProjects #PythonForBeginners #RaspberryPiProjects #WokwiSimulation CODE-- from machine import Pin from time import sleep red = Pin(0, Pin.OUT) green = Pin(1, Pin.OUT) blue = Pin(2, Pin.OUT) while True: red.on() sleep(1) red.off() sleep(1) green.on() sleep(1) green.off() sleep(1) blue.on() sleep(1) blue.off() sleep(1) Diagram.json--- { "version": 1, "author": "prabhat kumar", "editor": "wokwi", "parts": [ { "type": "wokwi-pi-pico", "id": "pico", "top": 0, "left": 0, "attrs": { "env": "micropython-20231227-v1.22.0" } }, { "type": "wokwi-rgb-led", "id": "rgb1", "top": 4, "left": -104.5, "attrs": { "common": "cathode" } } ], "connections": [ [ "pico:GND.1", "rgb1:COM", "black", [ "h-25.2", "v44.85", "h-67.3" ] ], [ "pico:GP0", "rgb1:B", "blue", [ "h-54", "v35.25" ] ], [ "rgb1:G", "pico:GP1", "green", [ "v9.6", "h49.3", "v-28.8", "h0", "v-9.6" ] ], [ "rgb1:R", "pico:GP2", "red", [ "v38.4", "h86.4", "v-44.85" ] ] ], "dependencies": {} }
Download
0 formatsNo download links available.