Posts

Showing posts from July, 2025

RGB LED Cycle Using Raspberry Pi Pico (MicroPython)

Image
  🔴🟢🔵 Button-Controlled RGB LED Cycle Using Raspberry Pi Pico (MicroPython) Objective To demonstrate how to use a push button to cycle through three different LEDs (Red, Green, and Blue) connected to a Raspberry Pi Pico. To learn input reading , edge detection , and RGB  control in MicroPython. Components Required S.N. Component Quantity 1 Raspberry Pi Pico 1 2 Red LED 1 3 Green LED 1 4 Blue LED 1 5 Push Button 1 6 220Ω Resistors 3 (optional) 7 Breadboard + Jumper Wires As needed 8 Micro USB Cable 1 Circuit Description Red LED → GPIO 2 Green LED → GPIO 1 Blue LED → GPIO 0 All cathodes of the LEDs go to GND through 220Ω resistors . Push Button → GPIO 15, with internal pull-down resistor enabled using Pin.PULL_DOWN . :::::circuit diagram:::::                                                         ...

Analog Signal Measurement by Pico

Image
   Analog Voltage Measurement Using Raspberry Pi Pico  Objective To read analog signals using the Raspberry Pi Pico's ADC (Analog to Digital Converter). To convert and display analog sensor values as digital voltage levels. Components Required S.N. Component Quantity 1 Raspberry Pi Pico 1 2 Analog sensor/potentiometer 1 3 Breadboard + Jumper wires As needed 4 Micro USB Cable 1 5 Computer with Thonny IDE 1 Circuit Description The analog output of the sensor (or middle pin of a potentiometer) is connected to GPIO 26 , which corresponds to ADC0 on the Raspberry Pi Pico. The other two ends of the sensor/potentiometer go to 3.3V and GND respectively. Ensure the Pico is connected to your PC via a Micro USB cable ckt diagram: video link: ADC Pin Mapping on Raspberry Pi Pico: ADC Channel GPIO Pin ADC0 GPIO 26 ADC1 GPIO 27 ADC2 GPIO 28 Working Principle This MicroPython script reads analog values using the ADC and converts them into voltage. Key Functi...

Raspberry pi pico alternating led blink

Image
Alternating LED Blink Using Raspberry Pi Pico (MicroPython)   Objective a. blinks two LEDs (Blue and Green) in an alternating pattern b. to control multiple GPIO pins using MicroPython. Components Required S.N. Component Quantity 1 Raspberry Pi Pico 1 2 Blue LED 1 3 Green LED 1 4 Breadboard + Wires As needed 5 Micro USB Cable 1  Circuit Description The Blue LED is connected to GPIO 0. The Green LED is connected to GPIO 1. The other terminal of both LEDs is connected to GND. ckt diagram: Video link : Code: MicroPython for Alternating Blink from machine import Pin from time import sleep led1 = Pin(0, Pin.OUT)  # Blue LED led2 = Pin(1, Pin.OUT)  # Green LED while True:     led1.on()     led2.off()     sleep(0.5)     led1.off()     led2.on()     sleep(0.5)  Working Principle ⦁ Pin(0, Pin.OUT) sets GPIO 0 (Blue LED) as an output. ⦁ Pin(1, Pin.OUT) set...

Push Button Using Raspberry Pi Pico

Image
  Control LED with Push Button Using Raspberry Pi Pico (MicroPython) Objective To control an LED using a push button on a Raspberry Pi Pico , written in MicroPython . This project is perfect for beginners learning input and output (I/O) control on microcontrollers.  Components Required S.N. Component Quantity 1 Raspberry Pi Pico 1 2 LED (any color) 1 3 220Ω Resistor 1(optional) 4 Push Button 1 5 Breadboard + Wires As needed 6 Micro USB Cable 1  Circuit Description LED's anode (long leg) is connected to GPIO 0 through a 220Ω resistor , and cathode to GND . Push button is connected between GPIO 1 and 3.3V . An internal pull-down resistor is enabled in code to keep the button input low when not pressed. When the button is pressed, the input pin reads HIGH , and the LED turns ON.         ckt diagram  Code: MicroPython for Button Controlled LED python from machine import Pin from time import sleep led = Pin( 0 , Pin.OU...

Raspberry Pi Pico toggle led part 1

Image
  LED Blinking Project Using Raspberry Pi Pico (MicroPython) Objective ⦁ To create a simple LED blinking circuit using the Raspberry Pi Pico ⦁ and control it using MicroPython.  ⦁ This project is ideal for beginners in embedded systems, ⦁ helping them understand GPIO pin control and timing.  Components Required S.N. Component Quantity 1 Raspberry Pi Pico 1 2 LED (any color) 1 3 Resistor (220Ω–470Ω) 1 4 Breadboard + Jumper Wires As required 5 Micro USB Cable 1 Circuit Description ⦁ The long leg (anode) of the LED is connected to GPIO Pin 0 of the Pico. ⦁ The short leg (cathode) connects through a resistor (220Ω) to GND.(optional) ⦁ The LED will turn on and off (toggle) at an interval of 0.5 seconds using a simple loop in  ckt diagram MicroPython.  Code: MicroPython for Blinking LED from machine import Pin from time import sleep led = Pin(0, Pin.OUT)  # LED connected to GPIO 0 while True:     led.tog...