Sadly I am not good at playing piano or any other instruments. So when I listened to music, I just tapped my two fingers on the table to the rhythms. So I plan to build a tiny playground where can play with a few fingers.
I was planning to build a seesaw, a swing and a slider.
- 1 x Arduino Uno or MKR1000
- 1 x Midi jack
- 1 x Stretch sensor/Adafruit
- 1 x Potentiometer
- 1 x Softpot
[MMA7361 datasheet] : Sleep mode, Self test, 0g detect etc
*AREF: Configures the reference voltage used for analog input
EXTERNAL: the voltage applied to the AREF pin (0 to 5V only) is used as the reference. (For AVR boards)
*** MKR1000 with analogreference(), and square/sq function
The library was written for Arduino UNO(I guess AVR boards). When I used the lib with MKR1000 there are a couple of errors occurred.
<Modified Version> Full code -> link
- Changing ‘analogReference(AR_EXTERNAL);’ for SAMD boards
2. square() -> sq() (I don’t know why the function name was different by boards. But anyway…)
So now I can use the library in my MKR1000 board!
(I didn’t use Uno and the accelerometer sensor but I could not find in Fritzing. But it almost similar)
Arduino -> Midi out -> MIDI Cable -> Midi in -> MIDI Tone Generator
I am still figuring it out the sounds with interaction. If I used the peak detection for stretch sensor value, the sound was getting plain and boring. If I did not used them, I could hear continues hitting sounds. I was thinking Seesaw is changing pitch and Swing changes velocity or hit.