The link below will get you up to speed in installing and setting up micripython on the pico
- Dual-Core ARM Cortex-M0+
- Clock speed 48MHz, Boost to 133MHz
- 8 ground pins
- 26 GPIOs
- Internal for LED
- 12-bit ADC
- 3 ADCs, Internal ADC for temperature
- 2 I2C buses
- 2 SPI buses
- 2 UART Buses
- 16 PWM channels
- Can operate as normal MCU
- Can be powered using micro-USB
- Battery powering
Pico can be programmed using Micropython or C++. The link below has additional information. Set up Thonny IDE to use with the Raspberry Pi Pico
Pico uses 3.3V logic and it has 26 GPIO pins with PWM. It has also internal pull up resistors to reduce the circuitry needed.
import machine
import utime
led_pin = machine.Pin(10, machine.Pin.OUT)
while True:
led_pin.value(1)
utime.sleep_ms(500)
led_pin.value(0)
utime.sleep(500)
import machine
import utime
btn = machine.Pin(11, machine.Pin.IN, machine.Pin.PULL_DOWN)
# pull down to hold the button low all the time unless when it is pressed
while True:
if btn.value() == 1:
print("pressed")
utime.sleep_ms(300)