It is a microcontroller with a low price tag. Microcontrollers are little computers, but they lack huge amounts of storage and auxiliary devices to which they can be connected (for example, keyboards or monitors).
Use digital inputs and outputs
- Resistor between about 50 and 330 ohms
- an LED
- pair of M-M jumper
- Raspberry Pi Pico
In this example, the LED is connected to pin 15.
Run your program and your LED should start to blink. If it’s not working, check your wiring to be sure that the LED is connected.
Next, let’s try and control the LED using a button.
The button is on pin 14, and is connected to the 3.3V pin on your Raspberry Pi Pico. This means when you set up the pin, you need to tell MicroPython that it is an input pin and needs to be pulled down.
from machine import Pin import time led = Pin(15, Pin.OUT) button = Pin(14, Pin.IN, Pin.PULL_DOWN) while True: if button.value(): led.toggle() time.sleep(0.5)
from machine import Pin, Timer led = Pin(15, Pin.OUT) timer = Timer() def blink(timer): led.toggle() timer.init(freq=2.5, mode=Timer.PERIODIC, callback=blink)
You can also check on