Back to engineering archive

Record 036 / Sensing and instrumentation

Capacitive-to-serial note-message draft

A capacitive input is mapped to note-message bytes on Serial in this archived draft, with acquisition-timing text written to the same stream.

Archived firmware draft
CapacitiveSensor APISerial outputNote-message bytes

Archived source flow

Archived capacitive sampling loop: request30samples, print acquisition timing, map the expected input range without bounds and emit note-shaped bytes on the same9600-baud serial stream. Delay10ms and repeat. Receiver compatibility and hardware operation are unverified.
Archived sampling and serial-output path. Mapping is unclamped and diagnostic text shares the note-byte stream; receiver and hardware operation are unverified. View diagram at full size

Technical notes

Acquisition and mapping

The loop requests a 30-sample capacitive reading, prints elapsed acquisition time, and maps an expected 0–100 reading range to 0–127 without constraining the result.

Serial message intent

Serial is configured at 9600 baud. The source writes a Note On-shaped status byte, a fixed note and the mapped value, followed by a 10 ms delay. Timing text is mixed into that stream.

Interface limits

There is no explicit Note Off strategy, input-range guard or verified receiver/electrical-interface test. The source does not establish a working MIDI transport; it is presented as an archived integration draft.

Engineering archiveArchive record

Project enquiries

Discuss your project.

Tell us what you’re developing and where you need engineering support.

Discuss your project