Touch sensing using capsense
The Teensy 3.0 MCU has a capacitive touch interface giving a much more up-to-date method for getting input data from users – pushbuttons are now a thing off the past (except for reset buttons).
The three analogue inputs A1, A2, A3 are connected to three metal studs and these can be used to detect changes in input capacitance when a user touches them.
Open and upload the sketch CapsenseV0.ino
.
Open the serial monitor and check that the touchsense inputs (TSns) are providing readings. These are very sensitive inputs, as shown by the fluctuating readings, so any slight change in capacitance at the input pins are detected. However, a clear step-change should be noticeable when a touch is detected.
- Implement a simple touch sense interface that turns on the RGB LED – TSns1 - red, TSns2 - green and TSns3 – blue.
- Modify to permit the touch inputs to control the colours displayed on the LED strip.