13 #ifndef CapacitiveSensor_h 14 #define CapacitiveSensor_h 22 #if defined(ARDUINO_NRF52840_CIRCUITPLAY) 23 #define RwReg uint32_t 24 #elif defined(__AVR__) 25 typedef volatile uint8_t RwReg;
49 unsigned long leastTotal;
50 unsigned int loopTimingFactor;
51 unsigned long CS_Timeout_Millis;
52 unsigned long CS_AutocaL_Millis;
53 unsigned long lastCal;
55 uint8_t _sendPin, _receivePin;
56 volatile RwReg *send_outport, *recv_outport, *recv_inport, *recv_direction;
57 RwReg send_mask, recv_mask;
60 int SenseOneCycle(
void);
long capacitiveSensor(uint8_t samples)
get a capacitive sensor reading
Definition: CPlay_CapacitiveSensor.cpp:95
long capacitiveSensorRaw(uint8_t samples)
get a raw sensor reading
Definition: CPlay_CapacitiveSensor.cpp:150
CPlay_CapacitiveSensor(uint8_t sendPin=0, uint8_t receivePin=0)
Function that handles the creation and setup of instances.
Definition: CPlay_CapacitiveSensor.cpp:29
Class that stores state and functions for the capacitive sensor on CircuitPlayground boards...
Definition: CPlay_CapacitiveSensor.h:34
void set_CS_Timeout_Millis(unsigned long timeout_millis)
set the sensor timeout
Definition: CPlay_CapacitiveSensor.cpp:188
void reset_CS_AutoCal()
reset the auto calibration
Definition: CPlay_CapacitiveSensor.cpp:168
void set_CS_AutocaL_Millis(unsigned long autoCal_millis)
set the auto-calibration time
Definition: CPlay_CapacitiveSensor.cpp:178