Class that stores state and functions for the capacitive sensor on CircuitPlayground boards.
More...
#include <CPlay_CapacitiveSensor.h>
Class that stores state and functions for the capacitive sensor on CircuitPlayground boards.
◆ CPlay_CapacitiveSensor()
CPlay_CapacitiveSensor::CPlay_CapacitiveSensor |
( |
uint8_t |
sendPin = 0 , |
|
|
uint8_t |
receivePin = 0 |
|
) |
| |
Function that handles the creation and setup of instances.
- Parameters
-
sendPin | send pin for the sensor |
receivePin | the receiving pin for the sensor |
◆ capacitiveSensorRaw()
long CPlay_CapacitiveSensor::capacitiveSensorRaw |
( |
uint8_t |
samples | ) |
|
get a raw sensor reading
- Parameters
-
samples | the number of samples to take |
- Returns
- -1 for error, -2 for timeout, other values are a raw sensor reading
◆ capacitiveSensor()
long CPlay_CapacitiveSensor::capacitiveSensor |
( |
uint8_t |
samples | ) |
|
get a capacitive sensor reading
- Parameters
-
samples | number of samples to take |
- Returns
- the sensor reading
◆ set_CS_Timeout_Millis()
void CPlay_CapacitiveSensor::set_CS_Timeout_Millis |
( |
unsigned long |
timeout_millis | ) |
|
set the sensor timeout
- Parameters
-
timeout_millis | the number of milliseconds to set the timeout to |
◆ set_CS_AutocaL_Millis()
void CPlay_CapacitiveSensor::set_CS_AutocaL_Millis |
( |
unsigned long |
autoCal_millis | ) |
|
set the auto-calibration time
- Parameters
-
autoCal_millis | the desired calibration time in milliseconds |
The documentation for this class was generated from the following files: