Comments (3)
Hi Simone,
I currently don't have time to work on adding support for new chips. That said, if you (or someone else) want to work on it, I'd be happy to accept pull requests 😉
Cheers
from adctouch.
I wish I could understand half the code you wrote... I know nothing about registers.
I found a different approach that works for my use-case. I will report here just in case someone else needs it.
It's dirty naive, but I only need to get a rough idea of how much a touch sensor was "touched".
uint16_t read(uint8_t pin) {
// write HIGH to pin, then LOW, then read its voltage
pinMode(pin, OUTPUT);
digitalWrite(pin, HIGH);
delay(50);
digitalWrite(pin, LOW);
pinMode(pin, INPUT);
uint16_t readings[numReadings];
uint16_t sum = 0;
for (int i = 0; i < numReadings; i++)
readings[i] = analogRead(pin);
for (int i = 0; i < numReadings; i++)
sum += readings[i];
return sum / numReadings;
}
from adctouch.
Seems like this should do it?
https://github.com/SpenceKonde/ADCTouch/tree/master/src
from adctouch.
Related Issues (9)
- Error message: if (digitalPin == NOT_A_PIN) return; HOT 3
- ATTINY85 (Digispark) returns negative values. HOT 7
- t13 has different ADMUX than tx5 HOT 3
- consider shifts instead of division HOT 3
- atmega328P @ 8mhz and 3,3v input voltage HOT 2
- tring to jnstall in arduino not install from libray HOT 3
- No license HOT 2
- ATSAMD51 supported HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adctouch.