# DC, Servo, Stepper Motors and Solenoids with the Pico

## Overview

https://youtu.be/A4HMFzgf8oI

You've got an RP2040 Pico and some motors and a burning desire to get them working together. This guide is here for you!

In it, you can pick among different types of motors/drives and learn how to wire them up and control them using CircuitPython!

**With lots of pins, and a "it's OK if it breaks" price, the Pico is great for robotics projects, and thanks to CircuitPython its also incredibly easy to use DC motors, Servo motors, Stepper motors and Solenoids.**

Let's get this motor party started!

## Parts
Featured
### Raspberry Pi Pico RP2040 with Loose Unsoldered Headers

[Raspberry Pi Pico RP2040 with Loose Unsoldered Headers](https://www.adafruit.com/product/4883)
The Raspberry Pi foundation changed single-board computing&nbsp;[when they released the Raspberry Pi computer](https://www.raspberrypi.org/archives/723), now they're ready to do the same for microcontrollers with the release of the brand new&nbsp; **Raspberry Pi...**

Out of Stock
[Buy Now](https://www.adafruit.com/product/4883)
[Related Guides to the Product](https://learn.adafruit.com/products/4883/guides)
![Top view of Raspberry Pi Pico with two 20-pin male headers.](https://cdn-shop.adafruit.com/640x480/4883-06.jpg)

Featured
### Raspberry Pi Pico RP2040

[Raspberry Pi Pico RP2040](https://www.adafruit.com/product/4864)
The Raspberry Pi foundation changed single-board computing [when they released the Raspberry Pi computer](https://www.raspberrypi.org/archives/723), now they're ready to do the same for microcontrollers with the release of the brand new **Raspberry Pi Pico**. This...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4864)
[Related Guides to the Product](https://learn.adafruit.com/products/4864/guides)
![Angle shot of Raspberry Pi Pico RP2040](https://cdn-shop.adafruit.com/640x480/4864-00.jpg)

Featured
### Standard servo - TowerPro SG-5010

[Standard servo - TowerPro SG-5010](https://www.adafruit.com/product/155)
This high-torque standard servo can rotate approximately 180 degrees (90 in each direction). You can use any servo code, hardware, or library to control these servos. Good for beginners who want to make stuff move without building a motor controller with feedback & gearbox. Comes with 3...

Out of Stock
[Buy Now](https://www.adafruit.com/product/155)
[Related Guides to the Product](https://learn.adafruit.com/products/155/guides)
![Standard hobby servo with three pin cable](https://cdn-shop.adafruit.com/640x480/155-01.jpg)

Featured
### DC Gearbox Motor - "TT Motor" - 200RPM - 3 to 6VDC

[DC Gearbox Motor - "TT Motor" - 200RPM - 3 to 6VDC](https://www.adafruit.com/product/3777)
Perhaps you've been assembling a new robot friend, adding&nbsp;a computer for a brain and other fun personality touches. Now the time has come to let it leave the nest and fly on its own wings– err, _wheels!_&nbsp;

These durable (but affordable!) plastic gearbox motors...

In Stock
[Buy Now](https://www.adafruit.com/product/3777)
[Related Guides to the Product](https://learn.adafruit.com/products/3777/guides)
![DC Gearbox Motor - TT Motor with two long wires and yellow body](https://cdn-shop.adafruit.com/640x480/3777-00.jpg)

Featured
### L9110H H-Bridge Motor Driver for DC Motors - 8 DIP

[L9110H H-Bridge Motor Driver for DC Motors - 8 DIP](https://www.adafruit.com/product/4489)
Run two solenoids or a single DC motor with up to 800mA per channel using the super-simple L9110H H-bridge driver. This bridge chip is an 8 DIP package so it's easy to fit onto any breadboard or perfboard.  
  
Each chip contains one full H-bridges (two half H-bridges). That means...

In Stock
[Buy Now](https://www.adafruit.com/product/4489)
[Related Guides to the Product](https://learn.adafruit.com/products/4489/guides)
![Demo Shot of the Feather wired to L9110 chip, driving a DC motor back and forth](https://cdn-shop.adafruit.com/product-videos/640x480/4489-03.jpg)

Featured
### Orange and Clear TT Motor Wheel for TT DC Gearbox Motor

[Orange and Clear TT Motor Wheel for TT DC Gearbox Motor](https://www.adafruit.com/product/3766)
Usually when one needs an orange wheel&nbsp;it's a garnish for a cocktail, like a tasty Sidecar. And speaking of cars,&nbsp;this wheel **&nbsp;** is for driving, not drinking!

Need a great drive solution for&nbsp;your little robotic friends?&nbsp;This&nbsp; **Orange...**

In Stock
[Buy Now](https://www.adafruit.com/product/3766)
[Related Guides to the Product](https://learn.adafruit.com/products/3766/guides)
![Orange and Clear TT Motor Wheel for DC Gearbox Motor](https://cdn-shop.adafruit.com/640x480/3766-00.jpg)

Featured
### Small Reduction Stepper Motor - 5VDC 32-Step 1/16 Gearing

[Small Reduction Stepper Motor - 5VDC 32-Step 1/16 Gearing](https://www.adafruit.com/product/858)
This is a great first stepper motor, good for small projects and experimenting with steppers. This uni-polar motor has a built-in mounting plate with two mounting holes. There are only 32 steps (11.25 degree) per revolution, and inside is a 1/16&nbsp;reduction gear set. (Actually it's...

In Stock
[Buy Now](https://www.adafruit.com/product/858)
[Related Guides to the Product](https://learn.adafruit.com/products/858/guides)
![Angled shot of small Reduction Stepper Motor](https://cdn-shop.adafruit.com/640x480/858-04.jpg)

Featured
### Adafruit DRV8833 DC/Stepper Motor Driver Breakout Board

[Adafruit DRV8833 DC/Stepper Motor Driver Breakout Board](https://www.adafruit.com/product/3297)
Spin two DC motors or step one bi-polar or uni-polar stepper with up to 1.2A per channel using the DRV8833. This motor driver chip is a nice alternative to the TB6612 driver. Like that chip, you get 2 full H-bridges, but this chip is better for low voltage uses (can run from 2.7V up to 10.8V...

In Stock
[Buy Now](https://www.adafruit.com/product/3297)
[Related Guides to the Product](https://learn.adafruit.com/products/3297/guides)
![Video of a Adafruit DRV8833 DC/Stepper Motor Driver Breakout Board connected to a half sized white board powering a stepper motor with a adabot head spinning on it. ](https://cdn-shop.adafruit.com/product-videos/640x480/3297-04.jpg)

Featured
### Mini Push-Pull Solenoid - 5V

[Mini Push-Pull Solenoid - 5V](https://www.adafruit.com/product/2776)
Solenoids are basically electromagnets: they are made of a coil of copper wire with an armature (a slug of metal) in the middle. When the coil is energized, the slug is pulled into the center of the coil. This makes the solenoid able to pull (from one end) or push (from the other).

This...

In Stock
[Buy Now](https://www.adafruit.com/product/2776)
[Related Guides to the Product](https://learn.adafruit.com/products/2776/guides)
![Mini Push-Pull Solenoid wired to Trinket, activating back and forth](https://cdn-shop.adafruit.com/product-videos/640x480/2776-07.jpg)

Featured
### N-channel power MOSFET

[N-channel power MOSFET](https://www.adafruit.com/product/355)
When you need to switch a lot of power, N-channel MOSFETs are best for the job. These FETs can switch over 60A and 30V and are TO-220 packages so they fit nicely into any breadboard or perfboard. Heat sinking is easy with TO-220's, but because of the very low Rds(on) of down to 0.009 ohms...

Out of Stock
[Buy Now](https://www.adafruit.com/product/355)
[Related Guides to the Product](https://learn.adafruit.com/products/355/guides)
![N-channel power MOSFET in TO-220 package](https://cdn-shop.adafruit.com/640x480/355-02.jpg)

Featured
### 1N4001 Diode - 10 pack

[1N4001 Diode - 10 pack](https://www.adafruit.com/product/755)
This here is a 10 pack of the classic 1N4001 power blocking diode. These are good for reverse polarity protection (put it between your DC power jack and circuitry to avoid a negative-voltage that would zap your delicate electronics), kickback protection (place across your solenoids, relays...

Out of Stock
[Buy Now](https://www.adafruit.com/product/755)
[Related Guides to the Product](https://learn.adafruit.com/products/755/guides)
![ 10 pack of 1N4001 Diodes](https://cdn-shop.adafruit.com/640x480/755-03.jpg)

Featured
### Colorful Round Tactile Button Switch Assortment - 15 pack

[Colorful Round Tactile Button Switch Assortment - 15 pack](https://www.adafruit.com/product/1009)
Little clicky switches are standard input "buttons" on electronic projects. These work best in a PCB but [can be used on a solderless breadboard as shown in this tutorial](http://www.ladyada.net/learn/arduino/lesson5.html). The pins are normally open (disconnected) and...

In Stock
[Buy Now](https://www.adafruit.com/product/1009)
[Related Guides to the Product](https://learn.adafruit.com/products/1009/guides)
![Top-down shot of 15 colorful round tactile button switches in green, yellow, red, blue, and white.](https://cdn-shop.adafruit.com/640x480/1009-07.jpg)

Featured
### Full Sized Premium Breadboard - 830 Tie Points

[Full Sized Premium Breadboard - 830 Tie Points](https://www.adafruit.com/product/239)
This is a 'full-size' premium quality breadboard, 830 tie points. Good for small and medium projects. It's 2.2" x 7" (5.5 cm x 17 cm) with a standard double-strip in the middle and two power rails on both sides. You can pull the power rails off easily to make the...

In Stock
[Buy Now](https://www.adafruit.com/product/239)
[Related Guides to the Product](https://learn.adafruit.com/products/239/guides)
![Angled shot of full sized breadboard.](https://cdn-shop.adafruit.com/640x480/239-03.jpg)

Featured
### Hook-up Wire Spool Set - 22AWG Solid Core - 6 x 25 ft

[Hook-up Wire Spool Set - 22AWG Solid Core - 6 x 25 ft](https://www.adafruit.com/product/1311)
Perfect for bread-boarding, free wiring, etc. This box contains 6 spools of solid-core wire. The wire is easy to solder to and when bent it keeps its shape pretty well. We like to have a few spools of this stuff around which is why this set is quite nice! We suggest picking up wire strippers...

In Stock
[Buy Now](https://www.adafruit.com/product/1311)
[Related Guides to the Product](https://learn.adafruit.com/products/1311/guides)
![Hook-up Wire Spool Set in box with 6 colorful wires coming out](https://cdn-shop.adafruit.com/640x480/1311-04.jpg)

## Power
Featured
### 4 x AA Battery Holder with 2.1mm Plug and On/Off Switch

[4 x AA Battery Holder with 2.1mm Plug and On/Off Switch](https://www.adafruit.com/product/3788)
Here's another addition to our growing family of&nbsp;[AA battery holders](https://www.adafruit.com/category/563). Behold! A&nbsp;holder for four (4) AA batteries! It's got&nbsp;a 5" long power cable with a 5.5/2.1mm DC jack at the end, an On/Off switch, and, oh yes,...

In Stock
[Buy Now](https://www.adafruit.com/product/3788)
[Related Guides to the Product](https://learn.adafruit.com/products/3788/guides)
![Angled shot of square black 4 x AA battery holder with 2.1mm plug and on/off switch.](https://cdn-shop.adafruit.com/640x480/3788-00.jpg)

Featured
### Female DC Power adapter - 2.1mm jack to screw terminal block

[Female DC Power adapter - 2.1mm jack to screw terminal block](https://www.adafruit.com/product/368)
If you need to connect a DC power wall wart to a board that doesn't have a DC jack - this adapter will come in very handy! There is a 2.1mm DC jack on one end, and a screw terminal block on the other. The terminals are labeled with positive/negative assuming a positive-tip configuration...

Out of Stock
[Buy Now](https://www.adafruit.com/product/368)
[Related Guides to the Product](https://learn.adafruit.com/products/368/guides)
![Angle shot Female DC Power adapter - 2.1mm jack to screw terminal block](https://cdn-shop.adafruit.com/640x480/368-03.jpg)

Featured
### Alkaline AA batteries (LR6) - 4 pack

[Alkaline AA batteries (LR6) - 4 pack](https://www.adafruit.com/product/3349)
Battery power for your portable project! These batteries are good quality at a good price, and work fantastic with any of the kits or projects in the shop that use AAs.&nbsp;This is a pack of **4 AA batteries**.  
  
These batteries are Alkaline (MnO2) chemistry, with a...

In Stock
[Buy Now](https://www.adafruit.com/product/3349)
[Related Guides to the Product](https://learn.adafruit.com/products/3349/guides)
![Angled shot of 4 Piscell AA batteries. ](https://cdn-shop.adafruit.com/640x480/3349-00.jpg)

## Tools
Featured
### Automatic Self-Adjusting Wire Strippers and Cutter

[Automatic Self-Adjusting Wire Strippers and Cutter](https://www.adafruit.com/product/4747)
If you've got a lot of wire-stripping to do, you may want to try out an automatic stripper/cutter! They are fantastic for stripping and cutting stranded and solid-core 24 or thicker AWG wires and ribbon cables. The tool has both metric (up to ~20mm) and imperial (up to 0.75")...

In Stock
[Buy Now](https://www.adafruit.com/product/4747)
[Related Guides to the Product](https://learn.adafruit.com/products/4747/guides)
![Person quickly stripping a piece of wire](https://cdn-shop.adafruit.com/product-videos/640x480/4747-05.jpg)

# DC, Servo, Stepper Motors and Solenoids with the Pico

## Installing CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the **CIRCUITPY** drive to iterate.

## CircuitPython Quickstart

Follow this step-by-step to quickly get CircuitPython working on your board.

[Download the latest version of CircuitPython for the Raspberry Pi Pico from circuitpython.org](https://circuitpython.org/board/raspberry_pi_pico/)
 **Click the link above and download the latest UF2 file.**

Download and save it to your desktop (or wherever is handy).

![circuitpython_Cat_UF2_download.png](https://cdn-learn.adafruit.com/assets/assets/000/098/753/medium640/circuitpython_Cat_UF2_download.png?1611157944)

Start with your Pico unplugged from USB. Hold down the **BOOTSEL** button, and while continuing to hold it (don't let go!), plug the Pico into USB. **Continue to hold the BOOTSEL button until the RPI-RP2 drive appears!**

If the drive does not appear, unplug your Pico and go through the above process again.

A lot of people end up using charge-only USB cables and it is very frustrating! **So make sure you have a USB cable you know is good for data sync.**

![raspberry_pi_one_one_two.png](https://cdn-learn.adafruit.com/assets/assets/000/125/993/medium640/raspberry_pi_one_one_two.png?1699493528)

You will see a new disk drive appear called **RPI-RP2**.

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **RPI-RP2.**

![circuitpython_Cat_RPI-RP2_drive.png](https://cdn-learn.adafruit.com/assets/assets/000/098/756/medium640/circuitpython_Cat_RPI-RP2_drive.png?1611158210)

![circuitpython_Cat_drag_UF2.png](https://cdn-learn.adafruit.com/assets/assets/000/098/758/medium640/circuitpython_Cat_drag_UF2.png?1611158274)

The **RPI-RP2** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it, you're done! :)

![circuitpython_Cat_CIRCUITPY.png](https://cdn-learn.adafruit.com/assets/assets/000/098/759/medium640/circuitpython_Cat_CIRCUITPY.png?1611158312)

## Flash Resetting UF2

If your Pico ever gets into a really _weird_ state and doesn't even show up as a disk drive when installing CircuitPython, try installing this 'nuke' UF2 which will do a 'deep clean' on your Flash Memory. You will lose all the files on the board, but at least you'll be able to revive it! After nuking, re-install CircuitPython

[flash_nuke.uf2](https://datasheets.raspberrypi.com/soft/flash_nuke.uf2)
# DC, Servo, Stepper Motors and Solenoids with the Pico

## Installing the Mu Editor

Mu is a simple code editor that works with the Adafruit CircuitPython boards. It's written in Python and works on Windows, MacOS, Linux and Raspberry Pi. The serial console is built right in so you get immediate feedback from your board's serial output!

Info: Mu is our recommended editor - please use it (unless you are an experienced coder with a favorite editor already!). While it has been announced end of life in 2026, it still works fine.

You are free to use whatever text editor you wish along with a terminal program to connect to the CircuitPython REPL. Thonny is one such editor.

## Download and Install Mu
Download Mu from&nbsp;[https://codewith.mu](https://codewith.mu/).

Click the&nbsp; **Download** link for downloads and installation instructions.

Click **Start Here&nbsp;** to find a wealth of other information, including extensive tutorials and and how-to's.

&nbsp;

![circuitpython_WtCP_codewithdotmu_main_page.png](https://cdn-learn.adafruit.com/assets/assets/000/105/677/medium640/circuitpython_WtCP_codewithdotmu_main_page.png?1634749167)

Warning: 

## Starting Up Mu
The first time you start Mu, you will be prompted to select your 'mode' - you can always change your mind later. For now please select **CircuitPython**!

The current mode is displayed in the lower right corner of the window, next to the "gear" icon. If the mode says "Microbit" or something else, click the **Mode** button in the upper left, and then choose "CircuitPython" in the dialog box that appears.

![circuitpython_WtCP_Mu_mode_dialogue.png](https://cdn-learn.adafruit.com/assets/assets/000/105/681/medium640/circuitpython_WtCP_Mu_mode_dialogue.png?1634750676)

Mu attempts to auto-detect your board on startup, so if you do not have a CircuitPython board plugged in with a **CIRCUITPY** drive available, Mu will inform you where it will store any code you save until you plug in a board.

To avoid this warning, plug in a board and ensure that the **CIRCUITPY** drive is mounted before starting Mu.

![circuitpython_WtCP_Mu_device_not_found.png](https://cdn-learn.adafruit.com/assets/assets/000/105/679/medium640/circuitpython_WtCP_Mu_device_not_found.png?1634749722)

## Using Mu

You can now explore Mu! The three main sections of the window are labeled below; the button bar, the text editor, and the serial console / REPL.

![](https://cdn-learn.adafruit.com/assets/assets/000/098/505/medium800/circuitpython_Mu_Window_Explained.png?1609970219)

Now you're ready to code! Let's keep going...

# DC, Servo, Stepper Motors and Solenoids with the Pico

## Installing Libraries

Alongside the core CircuitPython libraries (which are baked into CircuitPython), you'll also add the [Adafruit Motor library](https://github.com/adafruit/Adafruit_CircuitPython_Motor) to add some helpful control over your motors.

## Installing the Adafruit CircuitPython Motor Library

Download the [library bundle](https://circuitpython.org/libraries) here.&nbsp;

Copy the **adafruit\_motor** folder from the bundle to the **lib** folder on your **CIRCUITPY** drive.

Before continuing make sure your board's **lib** folder has the **adafruit\_motor** library folder copied over.

![robotics___cnc_motorlib.png](https://cdn-learn.adafruit.com/assets/assets/000/099/409/medium640/robotics___cnc_motorlib.png?1613181597)

# DC, Servo, Stepper Motors and Solenoids with the Pico

## DC Motors

Continuous DC motors can turn all the way around like a wheel. You can get them&nbsp;_un-geared_&nbsp;where they turn at a stunning 2000 to 6000 times a minute (RPM) or geared where they turn at only about 250 RPM.

[Check this page](https://learn.adafruit.com/make-it-move-with-crickit/motors-at-a-glance#continuous-dc-motor-2991379-4) for more info on DC motor types!

![robotics___cnc_3777-00.jpg](https://cdn-learn.adafruit.com/assets/assets/000/099/395/medium640/robotics___cnc_3777-00.jpg?1613173434)

You will also need an H-Bridge chip:

Featured
### L9110H H-Bridge Motor Driver for DC Motors - 8 DIP

[L9110H H-Bridge Motor Driver for DC Motors - 8 DIP](https://www.adafruit.com/product/4489)
Run two solenoids or a single DC motor with up to 800mA per channel using the super-simple L9110H H-bridge driver. This bridge chip is an 8 DIP package so it's easy to fit onto any breadboard or perfboard.  
  
Each chip contains one full H-bridges (two half H-bridges). That means...

In Stock
[Buy Now](https://www.adafruit.com/product/4489)
[Related Guides to the Product](https://learn.adafruit.com/products/4489/guides)
![Demo Shot of the Feather wired to L9110 chip, driving a DC motor back and forth](https://cdn-shop.adafruit.com/product-videos/640x480/4489-03.jpg)

With an H-bridge driver, you can control the direction the motor turns (clockwise or counter-clockwise) and the speed, from stopped to full speed.

All DC motors have **two** wires that are used to power and control them

## Wiring the Circuit
![](https://cdn-learn.adafruit.com/assets/assets/000/099/566/medium800/raspberry_pi_pico_motor_party_rev4_4.jpg?1613580198)

Follow the diagram above to breadboard the circuit. These are the connections you'll make:

**Pico**

- Pico **pin 34** ( **PWM6A** )&nbsp; to H-bridge **pin 7 (Input B)**
- Pico **pin 32 (PWM5B)** to H-bridge **pin 6 (Input A)**
- Pico **GND** to H-bridge **pin 8 (GND)**
- Pico **GND** to H-bridge **pin 5 (GND)**
- Pico **pin 30 (RESET)** to reset button to **GND**

**Power**

- Power supply **5V+** to 47uF capacitor to **GND**
- **5V rail** to H-bridge **pin 2 (VCC)**
- **5V rail** to H-bridge **pin 3 (VCC)**

**Motor**

- either **motor wire** to H-bridge **pin 1 (Output A)** 
- other **motor wire** to H-bridge **pin4 (Output B)**

Danger: 

## Code

Copy the code from the element below, and paste it into a fresh file in Mu. Save the file to your Pico's **CIRCUITPY** drive as **code.py** It will automatically run the code!

This is the basic motor test code that will run the motor at two different speeds in each direction and then stop. It's a great way to check that everything's working before moving on to something more complex.

https://github.com/adafruit/Adafruit_CircuitPython_Motor/blob/main/examples/motor_h-bridge_dc_motor.py

## How It Works

### Libraries

First, the libraries are imported for `time` so it can pause, `board` for pin definitions, `pwmio` for Pulse Width Modulation (PWM), and the `motor` module from `adafruit_motor` for easy motor control.

```python
import time
import board
import pwmio
from adafruit_motor import motor
```

### Setup

Two PWM pins are used to control the two H-bridge drivers in the L9110. PWM is a digital approximation of an analog signal, allowing a smooth-ish range of varying control to be specified for the motor speed. By using two PWM pins and the dual H-bridge driver, the motor can be set to move both forward and backward.

The Pico has eight channels of PWM, with two pins per channel. In order to clock them separately, the two pins chosen must be on different PWM channels.

The PWM outputs will be set to a particular pin and PWM frequency (the duty cycle is what will be varied by the `motor.throttle()` control).

Finally, the motor object is created with `motor.DCMotor(pwm_a, pwm_b)`.

```python
PWM_PIN_A = board.GP28
PWM_PIN_B = board.GP27

pwm_a = pwmio.PWMOut(PWM_PIN_A, frequency=50)
pwm_b = pwmio.PWMOut(PWM_PIN_B, frequency=50)
motor1 = motor.DCMotor(pwm_a, pwm_b)
```

### Control

Once the motor has been set up, it is controlled with the motor.throttle command. It can be set to anywhere from `-1.0` (full speed backward) to `1.0` (full speed forward). Practically speaking, a throttle value between -0.3 to 0.3 won't turn the motor, so keep that in mind.

A throttle of `0` stops the motor, while a value of `None` releases it to rotate freely.

```python
motor1.throttle = 0.5
time.sleep(1)

motor1.throttle = 0
time.sleep(1)

motor1.throttle = 1.0
time.sleep(1)

motor1.throttle = 0
time.sleep(1)

motor1.throttle = -1.0
time.sleep(1)

motor1.throttle = 0
time.sleep(1)

motor1.throttle = -0.5
time.sleep(1)

motor1.throttle = 0
time.sleep(1)

motor1.throttle = None
```

# DC, Servo, Stepper Motors and Solenoids with the Pico

## Servo Motors

Hobby Servos, also sometimes called Standard or Micro servos, are small boxy motors.

The size of the 'box' may vary but they _always_ have **three** wires for power and control and the wires are connected together into one 3-pin plug

![robotics___cnc_155-01.jpg](https://cdn-learn.adafruit.com/assets/assets/000/099/396/medium640/robotics___cnc_155-01.jpg?1613173634)

You might find a servo extender or 'extra long headers' helpful for plugging servos into breadboards:

Featured
### Servo Extension Cable - 30cm / 12" long -

[Servo Extension Cable - 30cm / 12" long -](https://www.adafruit.com/product/972)
Stretch out your servo connections with this flexible servo extension cord. It has a 3 pin shrouded "male" connection to plug your servo into and then, 30cm later, a 3 pin female connection. It even keeps the common red/black/white color coding. A great add-on to our <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/972)
[Related Guides to the Product](https://learn.adafruit.com/products/972/guides)
![Three pin Servo Extension Cable - 30cm / 12" long.](https://cdn-shop.adafruit.com/640x480/972-02.jpg)

Featured
### Extra-long break-away 0.1" 16-pin strip male header (5 pieces)

[Extra-long break-away 0.1" 16-pin strip male header (5 pieces)](https://www.adafruit.com/product/400)
Breakaway header is like the duct tape of electronics, and this header is one better with extra long pins on **both** sides. This makes it great for connecting things together that have two sockets - especially solderless breadboards. [We also...](https://www.adafruit.com/products/266)

In Stock
[Buy Now](https://www.adafruit.com/product/400)
[Related Guides to the Product](https://learn.adafruit.com/products/400/guides)
![5 pieces of Extra-long break-away 0.1 inch 16-pin strip male header](https://cdn-shop.adafruit.com/640x480/400-03.jpg)

Servos are a lot different than DC motors because while DC motors turn all the way around, standard **servos only move back and forth about 180 degrees**. But they can be controlled to rotate to a specific angle.

For more info on servos, [check out this page](https://learn.adafruit.com/make-it-move-with-crickit/motors-at-a-glance#hobby-servo-aka-standard-slash-micro-2991378-13).

![](https://cdn-learn.adafruit.com/assets/assets/000/099/392/medium800/robotics___cnc_pico_motor_party_rev1_3.jpg?1613172604)

Follow the diagram above to breadboard the circuit. These are the connections you'll make:

**Pico**

- Pico **pin 1** ( **GP0** )&nbsp; to servo **yellow data wire**
- Pico **GND** to servo **black/brown GND wire**  
- Pico **pin 5 (GP3)** to mode button to **GND**
- Pico **pin 30 (RESET)** to reset button to **GND**

**Power**

- Power supply **5V+** to 47uF capacitor to **GND**
- **5V rail** to servo **red/orange +V wire**

## Code

Copy the code from the element below, and paste it into a fresh file in Mu. Save the file to your Pico's **CIRCUITPY** drive as **code.py** It will automatically run the code!

Press the mode button to have the servo go directly to 0º, 90º, and 180º positions. Press the button a second time to have it smoothly sweep through its range.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Pico_RP2040_Servo/code.py

## How It Works

### Libraries

First, the libraries are imported for `time` so it can pause, `board` for pin definitions, `digitalio` to use buttons, `pwmio` for Pulse Width Modulation (PWM), and the `servo` module from `adafruit_motor` for easy servo motor control.

```python
import time
import board
from digitalio import DigitalInOut, Direction, Pull
import pwmio
from adafruit_motor import servo
```

### LED

The on-board LED is set up and turned on to show that the code is running, and will blink when the button is pressed.

```python
led = DigitalInOut(board.LED)
led.direction = Direction.OUTPUT
led.value = True


def blink(times):
    for _ in range(times):
        led.value = False
        time.sleep(0.1)
        led.value = True
        time.sleep(0.1)
```

### Button

The button is set up on pin **GP3** as an input with internal pull up resistor. When the button is pressed the `mode` variable will increment to set the servo test state.

```python
button = DigitalInOut(board.GP3)
button.direction = Direction.INPUT
button.pull = Pull.UP
mode = -1  # track state of button mode
```

### PWM & Servo

The PWM pin is used to control the servo angle. PWM is a digital approximation of an analog signal, allowing a smooth-ish range of varying control to be specified for the motor speed.

The PWM output will be set to pin **GP0** , duty cycle to half of the full 65,535, and PWM frequency of 50Hz.

The servo object is then created, specifying the PWM pin and the minimum and maximum pulse values for the servo - in microseconds. (This can vary from servo to servo, see datasheets or ask your vendor for details.)

```python
pwm_servo = pwmio.PWMOut(board.GP0, duty_cycle=2 ** 15, frequency=50)
servo1 = servo.Servo(
    pwm_servo, min_pulse=500, max_pulse=2200
)
```

### Servo Test Functions

The servo can be controlled to go directly to a particular angle by sending `servo.angle` commands.

This first function allows us to easily test sending the servo directly to 90º, 0º, and 180º.

The second function steps smoothly to an angle in 1º increments.

```python
# Servo test
def servo_direct_test():
    print("servo test: 90")
    servo1.angle = 90
    time.sleep(2)
    print("servo test: 0")
    servo1.angle = 0
    time.sleep(2)
    print("servo test: 90")
    servo1.angle = 90
    time.sleep(2)
    print("servo test: 180")
    servo1.angle = 180
    time.sleep(2)


# Servo smooth test
def servo_smooth_test():
    print("servo smooth test: 180 - 0, -1º steps")
    for angle in range(180, 0, -1):  # 180 - 0 degrees, -1º at a time.
        servo1.angle = angle
        time.sleep(0.01)
    time.sleep(1)
    print("servo smooth test: 0 - 180, 1º steps")
    for angle in range(0, 180, 1):  # 0 - 180 degrees, 1º at a time.
        servo1.angle = angle
        time.sleep(0.01)
    time.sleep(1)
```

# DC, Servo, Stepper Motors and Solenoids with the Pico

## Stepper Motor

Stepper motors -- much like their name implies, they "step" along.

These come with **four** , **five** or **six** wires.

**Like DC motors, they rotate all the way around.** But they do so very slowly, because of the little steps they have to take

**Like Servos, they have precision motion.** But not the way servos do, where you can set a specific angle. Instead you can rotate forward and back by little steps.

![robotics___cnc_858-04.jpg](https://cdn-learn.adafruit.com/assets/assets/000/099/397/medium640/robotics___cnc_858-04.jpg?1613173801)

Learn more about steppers [here](https://learn.adafruit.com/make-it-move-with-crickit/motors-at-a-glance#stepper-motors-2991405-25).

You'll need a stepper motor driver (a.k.a a dual H-Bridge):

Featured
### Adafruit DRV8833 DC/Stepper Motor Driver Breakout Board

[Adafruit DRV8833 DC/Stepper Motor Driver Breakout Board](https://www.adafruit.com/product/3297)
Spin two DC motors or step one bi-polar or uni-polar stepper with up to 1.2A per channel using the DRV8833. This motor driver chip is a nice alternative to the TB6612 driver. Like that chip, you get 2 full H-bridges, but this chip is better for low voltage uses (can run from 2.7V up to 10.8V...

In Stock
[Buy Now](https://www.adafruit.com/product/3297)
[Related Guides to the Product](https://learn.adafruit.com/products/3297/guides)
![Video of a Adafruit DRV8833 DC/Stepper Motor Driver Breakout Board connected to a half sized white board powering a stepper motor with a adabot head spinning on it. ](https://cdn-shop.adafruit.com/product-videos/640x480/3297-04.jpg)

Featured
### Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board

[Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board](https://www.adafruit.com/product/2448)
Spin two DC motors, step one bi-polar or uni-polar stepper, or fire off two solenoids with 1.2A per channel using the TB6612. These are perhaps better known as "[the drivers in our assembled Adafruit Motorshield](https://www.adafruit.com/products/1438)&nbsp;or&nbsp;<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/2448)
[Related Guides to the Product](https://learn.adafruit.com/products/2448/guides)
![Video of a spinning motor driver connected to a Adafruit TB6612 1.2A DC/Stepper Motor Driver Breakout Board. ](https://cdn-shop.adafruit.com/product-videos/640x480/2448-06.jpg)

The DRV8833 motor controller can control the two motor coils inside the stepper motor (think of it like a circular bucket brigade passing the power around A-B-A-B-A-B and so on) by receiving signals from four digital output pins on the Pico.

Wire it up as shown in the diagram here.

![](https://cdn-learn.adafruit.com/assets/assets/000/099/393/medium800/robotics___cnc_pico_motor_party_rev1_1.jpg?1613173055)

 **Pico**

- Pico **pin 27** ( **GP21** )&nbsp; to driver **pin BIN1**  
- Pico **pin 26 (GP20)** to driver **pin BIN2**
- Pico **pin 25 (GP19)** to driver **pin AIN2**
- Pico **pin 24 (GP18)** to driver **pin AIN1**
- Pico **GND** to driver **GND**
- Pico **3v3** to driver **VM**
- Pico **pin 30 (RESET)** to reset button to **GND**
- Pico **pin 5 (GP3)** to mode button to **GND**

**Power**

- Power supply **5V+** to driver **SLP**
- Power supply **GND** to common ground

**Motor** (wiring color varies by motor)

- Orange **motor wire** to driver **AOUT1**
- Pink **motor wire** to driver **AOUT2**
- Blue **motor wire** to driver **BOUT1**
- Yellow **motor wire** to driver **BOUT2**

## Code

Copy the code from the element below, and paste it into a fresh file in Mu. Save the file to your Pico's **CIRCUITPY** drive as **code.py** It will automatically run the code!

Press the mode button to have the stepper run through a single revolution forward and then a single revolution backward.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Pico_RP2040_Stepper/code.py

## How It Works

### Libraries

First, the libraries are imported for `time`, `board` for pin definitions, `digitalio` to use buttons as input and control pins as outputs to the driver board, and the `stepper` module from `adafruit_motor` for easy servo motor control.

```python
import time
import board
from digitalio import DigitalInOut, Direction, Pull
from adafruit_motor import stepper
```

### LED

The on-board LED is set up and turned on to show that the code is running, and will blink when the button is pressed.

```python
led = DigitalInOut(board.LED)
led.direction = Direction.OUTPUT
led.value = True


def blink(times):
    for _ in range(times):
        led.value = False
        time.sleep(0.1)
        led.value = True
        time.sleep(0.1)
```

### Button

The button is set up on pin **GP3** as an input with internal pull up resistor. When the button is pressed the `mode` variable will increment to set the servo test state.

```python
button = DigitalInOut(board.GP3)
button.direction = Direction.INPUT
button.pull = Pull.UP
mode = -1  # track state of button mode
```

### Stepper Setup

The stepper is set up next. `DELAY` sets the speed of the stepper, and the `STEPS` value is the number of steps in the motor.

The coils to be controlled by the driver board are set up on four of the Pico's digital output pins, next, and then the stepper object is created with these pins.

```python
DELAY = 0.006  # fastest is ~ 0.004, 0.01 is still very smooth, gets steppy after that
STEPS = 513  # this is a full 360º
coils = (
    DigitalInOut(board.GP21),  # A1
    DigitalInOut(board.GP20),  # A2
    DigitalInOut(board.GP19),  # B1
    DigitalInOut(board.GP18),  # B2
)
for coil in coils:
    coil.direction = Direction.OUTPUT

stepper_motor = stepper.StepperMotor(
    coils[0], coils[1], coils[2], coils[3], microsteps=None
)
```

### Stepper Functions

Two functions are made to control the stepper in a full revolution -- one forward, one backward -- and then a helper function is made to call those.

```python
def stepper_fwd():
    print("stepper forward")
    for _ in range(STEPS):
        stepper_motor.onestep(direction=stepper.FORWARD)
        time.sleep(DELAY)
    stepper_motor.release()


def stepper_back():
    print("stepper backward")
    for _ in range(STEPS):
        stepper_motor.onestep(direction=stepper.BACKWARD)
        time.sleep(DELAY)
    stepper_motor.release()


def run_test(testnum):
    if testnum is 0:
        stepper_fwd()
    elif testnum is 1:
        stepper_back()
```

### Main Loop

The main loop of the program watches for the button to be pressed and then runs the `run_test() `function alternating forward or backward with each button press.

```python
while True:
    if not button.value:
        blink(2)
        mode = (mode + 1) % 2
        print("switch to mode %d" % (mode))
        time.sleep(0.8)  # big debounce
        run_test(mode)
```

# DC, Servo, Stepper Motors and Solenoids with the Pico

## Solenoids

Solenoids are excellent for pushing and pulling small things. They are electromagnets that, when on, will push or pull a small metal slug a short distance. A built in spring is used to return the slug to its resting position when off.&nbsp;

![robotics___cnc_2776-04.jpg](https://cdn-learn.adafruit.com/assets/assets/000/099/399/medium640/robotics___cnc_2776-04.jpg?1613176534)

Solenoids use greater amount of current than a microcontroller can supply, so a MOSFET transistor will handle the power duties.

When the MOSFET gate pin receives signal from the Pico GP14 output, the MOSFET will allow the 5V to head through the solenoid to ground, thus energizing the solenoid's electromagnet and moving its slug.

When the Pico GP14 output goes low, the MOSFET gate will close and the solenoid will become de-energized, returning the slug to its resting position.

![](https://cdn-learn.adafruit.com/assets/assets/000/099/400/medium800/robotics___cnc_pico_motor_party_rev1_2.jpg?1613176645)

Follow the diagram above to breadboard the circuit. These are the connections you'll make:

- Pico **pin 19** ( **GP14** ) to MOSFET **gate**  
- Pico **GND** to common **ground rail**  
- Pico **pin 5 (GP3)** to mode button to **GND**
- Pico **pin 30 (RESET)** to reset button to **GND**
- Power supply **5V+** to 47uF capacitor to **GND**
- **5V rail** to solenoid **pin 2**  
- MOSFET **source** to **GND**
- MOSFET **drain** to solenoid **pin 1**
- Diode to shunt **5V** from **drain** and solenoid **pin 1**

![](https://cdn-learn.adafruit.com/assets/assets/000/099/563/medium800/robotics___cnc_solenoidfet.jpg?1613534557)

## Code

Copy the code from the element below, and paste it into a fresh file in Mu. Save the file to your Pico's **CIRCUITPY** drive as **code.py** It will automatically run the code!

In this program, all you need to do is press the mode button, and then the solenoid will strike four times.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Pico_RP2040_Solenoid/code.py

## How It Works

### Libraries

First, the libraries are imported for `time` so it can pause, `board` for pin definitions, and `digitalio` for lighting the onboard LED, using the mode button, and sending signals to the MOSFET to fire the solenoid.

```python
import time
import board
from digitalio import DigitalInOut, Direction, Pull
```

### LED

The on-board LED is set up and turned on to show that the code is running, and will blink when the button is pressed.

```python
led = DigitalInOut(board.LED)  # onboard LED setup
led.direction = Direction.OUTPUT
led.value = True


def blink(times):
    for _ in range(times):
        led.value = False
        time.sleep(0.1)
        led.value = True
        time.sleep(0.1)
```

### Button

The button is set up on pin **GP3** as an input with internal pull up resistor. When the button is pressed the solenoid will strike four times (you can change this number later).

```python
button = DigitalInOut(board.GP3)
button.direction = Direction.INPUT
button.pull = Pull.UP
```

### Solenoid Setup

The solenoid will be controlled by setting a GPIO output pin to high. Pin **GP14** on the Pico will be used for this -- since it can be anything from a PWM pin, to an I2C pin, to a digital input or output and more, we must first set the pin as a digital IO output pin.

Its `value` will be set low or `False` by default.

```python
solenoid = DigitalInOut(board.GP14)  #  pin drives a MOSFET
solenoid.direction = Direction.OUTPUT
solenoid.value = False
```

### Time Variables

It takes a fraction of a second to energize and then release the solenoid, as low as ~0.05 seconds depending on the power supply. A variable called `strike_time` is set to define this value. This determines if it'll be a very quick strike, or if the slug will get thrown and stay in that position for a while. You can hold it out for a second or more, but beware the power drain and possible over-heating of the solenoid coil if it is energized for too long without release.

The amount of time spent recovering in a non-energized state will be defined with the `recover_time` variable. This will determine the tempo of consecutive strikes.

```python
strike_time = 0.05 
recover_time = 0.20
```

Info: 

Solenoid Strike Function

The `solenoid_strike(loops)` function is set up to make it easy to loop through a number of solenoid strikes.

It takes an loops input value and then uses the `strike_time` and `recover_time` to repeat a pattern of strikes.

```python
def solenoid_strike(loops):  # solenoid strike function
    print("solenoid test")
    for _ in range(loops):
        solenoid.value = True
        time.sleep(strike_time)
        solenoid.value = False
        time.sleep(recover_time)
        time.sleep(0.1)
```

### Main Loop

The main loop waits for a button press, then blinks the onboard LED and strikes the solenoid four times (this number can be changed to whatever you like.

Press the button again and it repeats the process. Happy Pico-driven solenoiding!

```python
while True:
    if not button.value:
        blink(1)
        solenoid_strike(4)
```

# DC, Servo, Stepper Motors and Solenoids with the Pico

## Full Motor Party

![](https://cdn-learn.adafruit.com/assets/assets/000/099/576/medium800/raspberry_pi_picopartyboard_c.jpg?1613585482)

If you'd like, you can combine all of the previous steps into one big, popular, well attended motor party!

Mount it all on some cardboard or foam core and you've got a super fun demo board.

The wiring is essentially the same as each discrete motor demo from the previous pages, just spread out a bit for clarity.

![](https://cdn-learn.adafruit.com/assets/assets/000/099/575/medium800/raspberry_pi_wellattendedpicomotorparty.jpg?1613585479)

## Code

Copy the code from the element below, and paste it into a fresh file in Mu. Save the file to your Pico's&nbsp; **CIRCUITPY** &nbsp;drive as&nbsp; **code.py** &nbsp;It will automatically run the code!

Press the mode button to check out each test on the board. Each time you press the mode button it'll advance to the next motor test!

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Pico_RP2040_Motor_Party/code.py


## Guide Products

### Raspberry Pi Pico RP2040 with Loose Unsoldered Headers

[Raspberry Pi Pico RP2040 with Loose Unsoldered Headers](https://www.adafruit.com/product/4883)
The Raspberry Pi foundation changed single-board computing&nbsp;[when they released the Raspberry Pi computer](https://www.raspberrypi.org/archives/723), now they're ready to do the same for microcontrollers with the release of the brand new&nbsp; **Raspberry Pi...**

Out of Stock
[Buy Now](https://www.adafruit.com/product/4883)
[Related Guides to the Product](https://learn.adafruit.com/products/4883/guides)
### Raspberry Pi Pico RP2040

[Raspberry Pi Pico RP2040](https://www.adafruit.com/product/4864)
The Raspberry Pi foundation changed single-board computing [when they released the Raspberry Pi computer](https://www.raspberrypi.org/archives/723), now they're ready to do the same for microcontrollers with the release of the brand new **Raspberry Pi Pico**. This...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4864)
[Related Guides to the Product](https://learn.adafruit.com/products/4864/guides)
### Standard servo - TowerPro SG-5010

[Standard servo - TowerPro SG-5010](https://www.adafruit.com/product/155)
This high-torque standard servo can rotate approximately 180 degrees (90 in each direction). You can use any servo code, hardware, or library to control these servos. Good for beginners who want to make stuff move without building a motor controller with feedback & gearbox. Comes with 3...

Out of Stock
[Buy Now](https://www.adafruit.com/product/155)
[Related Guides to the Product](https://learn.adafruit.com/products/155/guides)
### DC Gearbox Motor - "TT Motor" - 200RPM - 3 to 6VDC

[DC Gearbox Motor - "TT Motor" - 200RPM - 3 to 6VDC](https://www.adafruit.com/product/3777)
Perhaps you've been assembling a new robot friend, adding&nbsp;a computer for a brain and other fun personality touches. Now the time has come to let it leave the nest and fly on its own wings– err, _wheels!_&nbsp;

These durable (but affordable!) plastic gearbox motors...

In Stock
[Buy Now](https://www.adafruit.com/product/3777)
[Related Guides to the Product](https://learn.adafruit.com/products/3777/guides)
### L9110H H-Bridge Motor Driver for DC Motors - 8 DIP

[L9110H H-Bridge Motor Driver for DC Motors - 8 DIP](https://www.adafruit.com/product/4489)
Run two solenoids or a single DC motor with up to 800mA per channel using the super-simple L9110H H-bridge driver. This bridge chip is an 8 DIP package so it's easy to fit onto any breadboard or perfboard.  
  
Each chip contains one full H-bridges (two half H-bridges). That means...

In Stock
[Buy Now](https://www.adafruit.com/product/4489)
[Related Guides to the Product](https://learn.adafruit.com/products/4489/guides)
### Orange and Clear TT Motor Wheel for TT DC Gearbox Motor

[Orange and Clear TT Motor Wheel for TT DC Gearbox Motor](https://www.adafruit.com/product/3766)
Usually when one needs an orange wheel&nbsp;it's a garnish for a cocktail, like a tasty Sidecar. And speaking of cars,&nbsp;this wheel **&nbsp;** is for driving, not drinking!

Need a great drive solution for&nbsp;your little robotic friends?&nbsp;This&nbsp; **Orange...**

In Stock
[Buy Now](https://www.adafruit.com/product/3766)
[Related Guides to the Product](https://learn.adafruit.com/products/3766/guides)
### Small Reduction Stepper Motor - 5VDC 32-Step 1/16 Gearing

[Small Reduction Stepper Motor - 5VDC 32-Step 1/16 Gearing](https://www.adafruit.com/product/858)
This is a great first stepper motor, good for small projects and experimenting with steppers. This uni-polar motor has a built-in mounting plate with two mounting holes. There are only 32 steps (11.25 degree) per revolution, and inside is a 1/16&nbsp;reduction gear set. (Actually it's...

In Stock
[Buy Now](https://www.adafruit.com/product/858)
[Related Guides to the Product](https://learn.adafruit.com/products/858/guides)
### Adafruit DRV8833 DC/Stepper Motor Driver Breakout Board

[Adafruit DRV8833 DC/Stepper Motor Driver Breakout Board](https://www.adafruit.com/product/3297)
Spin two DC motors or step one bi-polar or uni-polar stepper with up to 1.2A per channel using the DRV8833. This motor driver chip is a nice alternative to the TB6612 driver. Like that chip, you get 2 full H-bridges, but this chip is better for low voltage uses (can run from 2.7V up to 10.8V...

In Stock
[Buy Now](https://www.adafruit.com/product/3297)
[Related Guides to the Product](https://learn.adafruit.com/products/3297/guides)

## Related Guides

- [Sound Activated Shark Mask](https://learn.adafruit.com/sound-activated-shark-mask.md)
- [Tightrope Unicycle Bot](https://learn.adafruit.com/tightrope-unicycle-bot.md)
- [Reindeer Mask with Animated Eyes](https://learn.adafruit.com/reindeer-mask-with-animated-eyes.md)
- [Adafruit IO Basics: Servo](https://learn.adafruit.com/adafruit-io-basics-servo.md)
- [Blahaj Alarm and Lamp](https://learn.adafruit.com/blahaj-alarm.md)
- [Use an art canvas to diffuse an RGB matrix](https://learn.adafruit.com/use-an-art-canvas-to-diffuse-rgb-matrix.md)
- [Holiday Lights: Easy DIY Christmas Wreath & Garland with WLED](https://learn.adafruit.com/holiday-garland-decor-app-control-with-no-coding.md)
- [Bluetooth Controlled NeoPixel Lightbox](https://learn.adafruit.com/bluetooth-neopixel-lightbox.md)
- [3D Printed Case for Raspberry Pi Pico](https://learn.adafruit.com/raspberry-pi-pico-case.md)
- [Cam Follower Automaton](https://learn.adafruit.com/cam-follower-automaton.md)
- [No-Code Room Occupancy Status ](https://learn.adafruit.com/no-code-room-occupancy-status.md)
- [Little Desktop Connection Machine](https://learn.adafruit.com/little-connection-machine.md)
- [Crickit Powered Holiday Diorama](https://learn.adafruit.com/crickit-powered-holiday-diorama.md)
- [Easy NeoPixel Graphics with the CircuitPython Pixel Framebuf Library](https://learn.adafruit.com/easy-neopixel-graphics-with-the-circuitpython-pixel-framebuf-library.md)
- [MakeCode Arcade with SAMD51 M4](https://learn.adafruit.com/makecode-arcade-with-samd51-m4.md)
