Thursday, 29 August 2024

RPi Pico Connection

I've been given a Kitronik Autonomous Robotics Platform. It's a little robot buggy with a pair of motors, as well as a pair of ultrasonic sensors on the front. It's controlled by a Raspberry Pi Pico microcontroller.


I've done a lot of work with Arduino, but this is my first time using a Pico. So I'm documenting how to connect to it.

Kitronik recommends using Thonny as the IDE, and I've installed that.

First connection

I'm following the instructions at https://kitronik.co.uk/blogs/resources/first-steps-with-the-raspberry-pi-pico-and-thonny

I must select the MicroPython (Raspberry Pi Pico) option in the bottom right of the window. On my system it is COM37.

Entering the following code into the Thonny editor window;

import machine
import utime
#Setup the onboard LED Pin as an output
LED = machine.Pin(25,machine.Pin.OUT)
while True:
   LED.value(1)
   utime.sleep(0.5)
   LED.value(0)
   utime.sleep(0.5)




Clicking the green PLAY button causes the code to run and the onboard LED flashes at half-second intervals.

CH32V203 Big Round Button

Having successfully uploaded the Blink code to the  CH32V203 , the next task is to try the HID button demo. The circuit I’m using has two bu...