Pringles Can Drums w/ Arduino

Hi @ChunckLin,

Glad this project gave you some hope.
I saw the details from your other post. I can make a few suggestions, but please keep in mind, I am similar to you in that I figured out how to do this by doing a lot of internet searching and watching videos, so I may not be able to give you all the technical advice you need.

In terms of using the MKRZero board, it works just like setting up the piezos on a regular UNO and breadboard. The nice thing about the MKRZero is that it is automatically recognized as a MIDI device in Sonic Pi when it is plugged into the computer with the USB without needing to use any additional MIDI cables or hook ups. In the arduino code, you just include the noteOn function inside the conditional statement that executes when the piezo sensor reading goes above the threshold.
Be aware that the second argument in the noteOn function is the one that sets what note will play.
Example: noteOn(0x90, 48, 0x45); - The second argument is 48, so it plays the MIDI note 48.
In the Sonic Pi code, I just make a conditional statement that says if the incoming note from the MIDI device is 48, play a drum sample.

In your case, the issue you are having may have something to do with using the 5 pin MIDI output and MIDI to USB cable. I have tried playing around with making a MIDI output with a 5 pin female MIDI connector but have never had success (maybe you could help me with that :grinning:) There is a way that you can send MIDI messages from an arduino UNO without using any MIDI hardware. it just involves downloading a third party midi serial bridge program that allows the serial output of the arduino to be converted to MIDI messages that can be picked up from Sonic Pi. It is called “Hairless Midi” : http://projectgus.github.io/hairless-midiserial/
I have had success doing that as well which I documented in a post here
It involves using potentiometers, not piezos, but I would imagine it would transfer easily enough.

I noticed some people recommending you update to Sonic PI 3.3, but just so you know, none of these projects I did were on 3.3 and I actually haven’t tried them with the updated version yet.

I hope that helps you. Let me know if you have anymore questions.