2.5 Drum Kit

For this project, let’s make a drum kit with three buttons and a slide switch. Now, play your own drums.

Required Components

In this project, we need the following components.

It’s definitely convenient to buy a whole kit, here’s the link:

Name

ITEMS IN THIS KIT

LINK

Kepler Kit

450+

Kepler Kit

You can also buy them separately from the links below.

SN

COMPONENT

QUANTITY

LINK

1

Raspberry Pi Pico W

1

BUY

2

Micro USB Cable

1

3

Breadboard

1

BUY

4

Jumper Wires

Several

BUY

5

Resistor

4(10KΩ)

BUY

6

Button

3

BUY

7

Capacitor

1(104)

BUY

8

Micro Switch

1

Wiring

drum_kit0

  • When the slide switch is toggled to the right, GP12 is high; when toggled to the left, GP12 is low.

  • Each of the three buttons is connected to a pull-down resistor, GP13~GP15 are low by default; when the button is pressed, GP13~GP15 are high.

Code

Note

  • You can refer to the image below to write code by dragging and dropping.

  • Import 2.5_drum_kit.png from the path of kepler-kit-main\piper. For detailed tutorials, please refer to Import the Code.

drum_kit

After connecting Pico W, click the Start button and the code starts to run. Pressing different buttons or toggling the slide switch will produce different drum sounds, just like a drum kit.

Note

If you are using a computer, you will need to plug in headphones or audio to your computer to hear the sound emitted.