Adafruit Library
Public Member Functions | List of all members
CPlay_CapacitiveSensor Class Reference

Class that stores state and functions for the capacitive sensor on CircuitPlayground boards. More...

#include <CPlay_CapacitiveSensor.h>

Public Member Functions

 CPlay_CapacitiveSensor (uint8_t sendPin=0, uint8_t receivePin=0)
 Function that handles the creation and setup of instances. More...
 
long capacitiveSensorRaw (uint8_t samples)
 get a raw sensor reading More...
 
long capacitiveSensor (uint8_t samples)
 get a capacitive sensor reading More...
 
void set_CS_Timeout_Millis (unsigned long timeout_millis)
 set the sensor timeout More...
 
void reset_CS_AutoCal ()
 reset the auto calibration
 
void set_CS_AutocaL_Millis (unsigned long autoCal_millis)
 set the auto-calibration time More...
 

Detailed Description

Class that stores state and functions for the capacitive sensor on CircuitPlayground boards.

Constructor & Destructor Documentation

◆ CPlay_CapacitiveSensor()

CPlay_CapacitiveSensor::CPlay_CapacitiveSensor ( uint8_t  sendPin = 0,
uint8_t  receivePin = 0 
)

Function that handles the creation and setup of instances.

Parameters
sendPinsend pin for the sensor
receivePinthe receiving pin for the sensor

Member Function Documentation

◆ capacitiveSensorRaw()

long CPlay_CapacitiveSensor::capacitiveSensorRaw ( uint8_t  samples)

get a raw sensor reading

Parameters
samplesthe 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
samplesnumber 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_millisthe 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_millisthe desired calibration time in milliseconds

The documentation for this class was generated from the following files: