L298N to Motors:
K1/K2 to right motors
K3/K4 to left motors

GP16(Physical#21) to IN1 right motor direction pin
GP17(Physical#22) to IN2 right motor direction pin
GP18(Physical#24) to IN3 left motor direction pin
GP19(Physical#25) to IN4 left motor direction pin
GP10(Physical#14) to ENA right motor PWM
GP9(Physical#12)  to ENB left motor PWM

GP# as per the light green pin icons in following picture:

Step 1) Install Arduino IDE
Visit and install the latest Arduino IDE software for your computer

Step 2) Install Arduino Mbed OS RP2040 board to support Pico:

Open Arduino IDE ->Tools ->Board Manager

In search bar, search pico , you will find a board name “Arduino Mbed OS RP2040 board “, Click Install button to install the latest version for this board into IDE.

Step 3) Install RP2040_PWM library
Download the file from

Then Open Arduino IDE-> click Sketch->Include Library->Add .Zip Library->upload the  file to IDE

Step 4)Download and Run the Arduino Code:
Please download the code file from

Unzip the file and run the picocar-lesson1.ino sketch file through Arduino IDE, after you upload the code,  please put the car to ground, turn on the power and your car will move forward, backward, left turn and right turn.