This is a simple and fun project, and it's the foundation for creating some more complex projects.
This guide shows how to use the:
- LSM6DS3 IMU mounted (reference here: https://www.arduino.cc/en/Reference/Arduino_LSM6DS3)
- Arduino Nano 33 IoT (https://store.arduino.cc/arduino-nano-33-iot)
- Midi USB feature (reference here: https://www.arduino.cc/en/Reference/MIDIUSB).
In order to hear some "noise," you'll need Midi-compatible software. I'm using GarageBand on a OSX but you can use also Reaper, that is free for PC / Mac.
IMU stands for Inertial Measurement Unit, as well explained here: https://en.wikipedia.org/wiki/Inertial_measurement_unit
Basically the IMU reads the orientation of the board in the space, this allows to understand the position and manage it. In this Tutorial, it read the movement of the board and when it inverts, it sends the Midi command to play the note.
The code is self commented.
How to use it:
Just plug in the Nano board, upload the sketch from Create Web Editor, open GarageBand / Reaper, assign a good drum pattern, and enjoy!
If you have two or more Nano boards, you can upload the code to each one and change the note played. In this way, you'll create a complete drum set !