HelloCapTouch1.ino
1 // SPDX-FileCopyrightText: 2020 Carter Nelson for Adafruit Industries 2 // 3 // SPDX-License-Identifier: MIT 4 5 #include <Adafruit_CircuitPlayground.h> 6 7 //////////////////////////////////////////////////////////////////////////// 8 void setup() { 9 // Initialize serial. 10 Serial.begin(9600); 11 12 // Initialize Circuit Playground library. 13 CircuitPlayground.begin(); 14 } 15 16 //////////////////////////////////////////////////////////////////////////// 17 void loop() { 18 // Print cap touch reading on serial port. 19 Serial.println(CircuitPlayground.readCap(1)); 20 21 // Update rate. 22 delay(100); 23 }