Lesson 6: CPX as a Keyboard
Table of Contents
- Lesson 6.1: Making a Programmable Keyboard
- Lesson 6.2: The CPX as a Media Player Controller
- Lesson 6.3: Accelerometer Keyboard
- Project Examples
- Next Lesson
In Lesson 6 of our CPX series, we will learn how to use the CPX as a programmable keyboard. We’ll begin by making the A and B buttons into keyboard presses and then create increasingly fun and interesting keyboards, including a media controller keyboard (Lesson 6.2) and an accelerometer-based keyboard (Lesson 6.3).
Note: there is some overlapping content with Lesson 5.3: Making a Capacitive Keyboard but we wanted to start from the beginning here and grow outward! So, you should be able to complete these lessons even if you have not completed Lesson 5.3.
Lesson 6.1: Making a Programmable Keyboard
In this lesson, we will show how to use the CPX as a programmable keyboard
Lesson 6.1 Code
Here’s a link to the MakeCode we wrote in this lesson:
Lesson 6.2: The CPX as a Media Player Controller
In this lesson, we will show how to use the media key functionality to control Spotify and YouTube.
Lesson 6.2 Code
Here’s the MakeCode we created during this lesson, which shows how to use media key presses to control Spotify and YouTube.
Lesson 6.3: Accelerometer Keyboard
In this lesson, we show how to translate the accelerometer signal to key presses.
Lesson 6.3 Code
As promised, here’s a different take (code link) on the real-time tilt keyboard that we previously created but is different from the solution we came up with during the video.
Project Examples
All project examples below provide tutorials with example MakeCode code.
- Mouse Painter, John Park
- Make it a Mouse, Anne Barela
Next Lesson
In the next lesson, we’ll extend our work to build a custom interactive mouse.