Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cap1xxx #2

Closed
jcoliz opened this issue Apr 26, 2017 · 0 comments
Closed

Cap1xxx #2

jcoliz opened this issue Apr 26, 2017 · 0 comments

Comments

@jcoliz
Copy link
Owner

jcoliz commented Apr 26, 2017

C# Library for Microchip Capacitive Touch devices in the Cap1xxx family.

Function Reference

using IotFrosting

const int alert_pin = 25;
using (var dh = await Cap1xxx.Open(alert_pin) )
{
}

Unlink the LEDs from the inputs, so the Cap1xxxx chip does not manage autolights itself.

dh.AutoLights = false;

Turn on a particular LED

dh.Leds[0].State = true;

You can check the state of any particular input

bool pressed = dh.Input[0].State;

Each input raises an Updated event when its state changes

dh.Input[7].Updated += (s,e) => Debug.WriteLine($"Button {e.Id} {e.State}");

See

https://github.com/pimoroni/cap1xxx
http://ww1.microchip.com/downloads/en/DeviceDoc/00001620C.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant