Arduino capacitive sensors with a bunch of cables

Week 10: Attempts with MIDI and capacitive sensing

To work on my project Sound Flowers, last week I connected Arduino to Ableton and experimented with capacitive sensors. This week, I delved into the project more, but the results were not always successful.

Using MIDIUSB instead of Firmata

Last time, I used Firmata to connect an arduino device to Ableton. However, I wanted to use direct MIDI signals into Ableton rather than using Ableton's connection kit for Ableton. The main reasons were that (1)I was not familiar with the Firmata protocol and (2)I wanted to use the MIDI velocity property.

Because of these reasons, I switched to using a Nano 33 IoT, which is capable of using the MIDIUSB library. The MIDIUSB library enables Arduino's USB connection to behave like a USB MIDI device. I opted in using the MIDIUSB because I wanted to keep the MIDI connection simple without using any additional parts such as a MIDI socket.

Ableton receiving MIDI signals from the Arduino Nano 33 IoT's USB serial port

Capacitive sensing with only one pin

Using the OnePinCapSense/ADCTouch library

The next step was to enable capacitive sensing. Last week, I tried capacitive sensing with the CapacitiveSensor library. However, this method had a problem - it required 2 pinouts for one sensor, which made the wiring difficult to have a form that I want.

In order to make the wiring more simple, I wanted to use a capacitive sensor that requires using only one pinout to the Arduino. I found 2 solutions for this one-pin issue: using the OnePinCapSense library or the ADCTouch library.

Error message saying that the Arduino Nano 33 IoT is incompatible

Unfortunately, both libraries seemed to not work with the Nano 33 IoT because of the difference in architecture.

Using the CapacitiveSensor library

Cables connected to the Arduino Nano 33 IoT - which are supposed to send MIDI signals when I touch the end of the cable

Arduino code for connecting capacitive sensor to MIDI

After searching the internet, I could find multiple projects that uses only one pin per one capacitive sensor. So I tried just going with the capacitive sensor library, and implemented a code. This code helped me a lot to figure out how to use multiple, single-pin capacitive sensors at once.

However, the result ended up not working. I still couldn't find the reason - at least the Arduino parts seems not to be a problem since it connects with Ableton well.

* Note: After receiving feedback from Yeseul and Jason from the Physical Computing class, it seems that capacitive sensing with one pin is possible just using the capacitive sensor library. Jason also sent me some helpful code, so I will try finishing this project further.