Skip to content

A Library for interfacing with the TI FDC2214 capacitive sensing chip for Arduino boards.

Notifications You must be signed in to change notification settings

AdamGoertz/FDC2214Lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

FDC2214 Library for Arduino

Dependencies

  • Wire

Example

FDC2214 objects can be constructed and configured using a sequence of function calls to modify the sensor's configurations registers. The begin() method transmits the configuration parameters to the FDC. Each object is initialized with a set of reasonable default parameters, but the default configuration may need to be tweaked depending on your application.

#include <FDC2214Lib.h>

FDC2214 sensor;

void setup() {
    sensor.withI2cAddress(0)
          .withInternalOscillator()
          .withContinuousConversion(0)
          .withReferenceCount(0xFFFF)
          .withSettleCount(100)
          .withDriveCurrent(31)
          .withDeglitchValue(DEGLITCH_10MHZ)
          .begin();

    Serial.begin(9600);
}

void loop() {
    Serial.println(sensor.getSensorReading(0));
}

Thanks to

  • zharijs https://github.com/zharijs/FDC2214
    • The inspiration for this library and many of defined constants are borrowed directly from the linked FDC2214 library. My implementation aims to rewrite and improve this library to provide greater readability and flexibility.

About

A Library for interfacing with the TI FDC2214 capacitive sensing chip for Arduino boards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages