The 3-Note Piano makes use of the capacitive sensing library to generate a tone when a sensing plate is touched. A sensing plate, which is a material with insulating properties, is connected to a high value resistor enables the Arduino to sense the electrical capacitance of the human body.
In Simulink, C-code is wrapped in an S-Function.
Updated model to show display outputs in External Mode.
Inspired by: Device Drivers