Chicken Nugget Piano Learn how to use touch sensors with Raspberry Pi Pico to make a chicken nugget piano 8 March 2025 4 minute read By Kevin McAleer Share this article on Table of Contents 1 pin Capacitive Touch SensorsHow Capactive Touch works?Making a PianoCardboard foil pianoClose upNugget PianoNuggetNugget PianoOverheadChicken Nugget PianoSetting up the PicoWiringMidi Tags: Raspberry Pi Pico touch circitpython micropython Difficulty: beginner Category: pico micropython music weird Code: https://www.github.com/kevinmcaleer/PicoTouch Home Blog Chicken nugget piano Chicken Nugget Piano Learn how to use touch sensors with Raspberry Pi Pico to make a chicken nugget piano 8 March 2025 | 4 minute read | By Kevin McAleer | Share this article on Video For every project I create, I often make a corresponding YouTube video. Sometimes, there might be more than one video for a single project. You can find these videos in this section. Explore more through this this dedicated video. Setting up touch sensors with Raspberry Pi Pico is easier than youâd think. In this project, we will use the touch sensors to make a chicken nugget piano. 1 pin Capacitive Touch Sensors Capacitive touch sensors work by detecting the change in capacitance when a conductive object (such as a human finger) comes in contact with the sensor. The human body acts as a capacitor, and when it comes in contact with the sensor, the capacitance of the sensor changes. This change in capacitance is detected by the sensor, and the touch is registered. It only requires a single pin to read the touch sensor, this means we can have 26 touch sensors on a single Raspberry Pi Pico. How Capactive Touch works? We can detect the touch by measuring the time it takes for the GPIO pin to discharge. When the touch sensor pad is not touched, the GPIO pin will discharge slowly. When the touch sensor pad is touched, the GPIO pin will discharge quickly. By measuring the time it takes for the GPIO pin to discharge, we can detect the touch. To filter our the noise we can use a threshold value, if the time it takes for the GPIO pin to discharge is less than the threshold value, we can assume that the touch sensor pad has been touched. Making a Piano Cardboard foil piano Close up The easiest way to start is to cut out some aluminium foil and stick it to some cardboard - I laser-cut some wood using a simple 1 octave piano layout. I then stuck the foil to the back of the wood and connected it to the Raspberry Pi Pico using crocodile clips, and jumper wires. The 1M Ohm resistor is connected to the GPIO pin and a GND pin. I plugged the Pico into a breadboard to make the wiring easier, there is just enough room to put a jumper wire and 1M Ohm resistor in the same row on the breadboard. I then connect the crocodile clips to the jumper wire and also to the foil on the piano. Download the Touch Piano PDF here. Nugget Piano Nugget Nugget Piano Overhead Chicken Nugget Piano Setting up the Pico The easiest way to use touch in your projects is to use CircuitPython as this has a mature touch library. You can also use MicroPython, but you will need to write your own touch library (which I have here if youâre interested, make sure to upload it to the pico to use it in your projects). To install CircuitPython, simply load up Thonny IDE hold the boot button down when attaching the Pico and then click on the âInstall CircuitPythonâ button at the bottom of the screen. This will install the latest version of CircuitPython on your Pico. Wiring You will also need to drag the touch and midi libraries from the Adafruit CircuitPython touch library onto the Pico as well, in the lib folder. Midi Midi is a protocol that allows electronic musical instruments, computers, and other equipment to communicate with each other. It is used to send information about the pitch, velocity, and duration of a note, as well as other information such as the instrument being used. We can use the Midi library in our project to send the note information to a computer or other device that can play the note. This allows us to create a simple piano using the touch sensors and the Raspberry Pi Pico. I connected the pico using a USB cable to my computer and used garage band to play and hear the notes. Code View Code Repository on GitHub - https://www.github.com/kevinmcaleer/PicoTouch Liked this article? You might like these too. 10 Projects for your Raspberry Pi Pico If you've just got a new Raspberry Pi Pico and you're looking for some inspiration, then you've come to the right place. Here is a collection of projects that you can build with your Raspberry Pi Pico. Picotamachibi Iâve always love the 90s Tamagotchi toys and wanted to build and program my own, using MicroPython and a Raspberry Pi Pico. Pico Birthday Card How to Make an Ultimate DIY Birthday Card with Raspberry Pi Pico Power up your robot projects Selecting the right energy source is crucial, and we've got you covered. Join us as we dive into batteries, solar power, level shifters, and more! Boost your robot's performance and efficiency with our comprehensive guide on power sources and techniques. Pico-Deck Create a Raspberry Pi Pico Based shortcut macro Keypad Self Watering Plants Create a self watering plant system using the Pimoroni Enviro Grow
Chicken Nugget Piano Learn how to use touch sensors with Raspberry Pi Pico to make a chicken nugget piano 8 March 2025 4 minute read By Kevin McAleer Share this article on Table of Contents 1 pin Capacitive Touch SensorsHow Capactive Touch works?Making a PianoCardboard foil pianoClose upNugget PianoNuggetNugget PianoOverheadChicken Nugget PianoSetting up the PicoWiringMidi Tags: Raspberry Pi Pico touch circitpython micropython Difficulty: beginner Category: pico micropython music weird Code: https://www.github.com/kevinmcaleer/PicoTouch
Setting up touch sensors with Raspberry Pi Pico is easier than youâd think. In this project, we will use the touch sensors to make a chicken nugget piano. 1 pin Capacitive Touch Sensors Capacitive touch sensors work by detecting the change in capacitance when a conductive object (such as a human finger) comes in contact with the sensor. The human body acts as a capacitor, and when it comes in contact with the sensor, the capacitance of the sensor changes. This change in capacitance is detected by the sensor, and the touch is registered. It only requires a single pin to read the touch sensor, this means we can have 26 touch sensors on a single Raspberry Pi Pico. How Capactive Touch works? We can detect the touch by measuring the time it takes for the GPIO pin to discharge. When the touch sensor pad is not touched, the GPIO pin will discharge slowly. When the touch sensor pad is touched, the GPIO pin will discharge quickly. By measuring the time it takes for the GPIO pin to discharge, we can detect the touch. To filter our the noise we can use a threshold value, if the time it takes for the GPIO pin to discharge is less than the threshold value, we can assume that the touch sensor pad has been touched. Making a Piano Cardboard foil piano Close up The easiest way to start is to cut out some aluminium foil and stick it to some cardboard - I laser-cut some wood using a simple 1 octave piano layout. I then stuck the foil to the back of the wood and connected it to the Raspberry Pi Pico using crocodile clips, and jumper wires. The 1M Ohm resistor is connected to the GPIO pin and a GND pin. I plugged the Pico into a breadboard to make the wiring easier, there is just enough room to put a jumper wire and 1M Ohm resistor in the same row on the breadboard. I then connect the crocodile clips to the jumper wire and also to the foil on the piano. Download the Touch Piano PDF here. Nugget Piano Nugget Nugget Piano Overhead Chicken Nugget Piano Setting up the Pico The easiest way to use touch in your projects is to use CircuitPython as this has a mature touch library. You can also use MicroPython, but you will need to write your own touch library (which I have here if youâre interested, make sure to upload it to the pico to use it in your projects). To install CircuitPython, simply load up Thonny IDE hold the boot button down when attaching the Pico and then click on the âInstall CircuitPythonâ button at the bottom of the screen. This will install the latest version of CircuitPython on your Pico. Wiring You will also need to drag the touch and midi libraries from the Adafruit CircuitPython touch library onto the Pico as well, in the lib folder. Midi Midi is a protocol that allows electronic musical instruments, computers, and other equipment to communicate with each other. It is used to send information about the pitch, velocity, and duration of a note, as well as other information such as the instrument being used. We can use the Midi library in our project to send the note information to a computer or other device that can play the note. This allows us to create a simple piano using the touch sensors and the Raspberry Pi Pico. I connected the pico using a USB cable to my computer and used garage band to play and hear the notes.