Comments (2)
After some poking around it seems
QTOUCH_PTC->BURSTMODE.reg = 0xA4;
is the cause of trouble.
So after change measureRaw to this, it seems OK.
uint16_t Adafruit_CPlay_FreeTouch::measureRaw(void) {
if (yline == -1)
return -1;
runInStandby(true);
enablePTC(true);
// check if in progress
// set up NVIC if using INT (we're not)
enableWCOint(false);
clearWCOintFlag();
clearEOCintFlag();
// enable_eoc_int(); // not using irq (for now)
// set up pin!
//Serial.print("Y Line #"); Serial.println(yline);
selectYLine();
// set up sense resistor
setSeriesResistor(seriesres);
// set up prescalar
setOversampling(oversample);
// set up freq hopping
setFreqHopping(freqhop, hops);
// set up compensation cap + int (?) cap
setCompCap(compcap);
setIntCap(intcap);
uint32_t BURSTMODE_REG_BACKUP = QTOUCH_PTC->BURSTMODE.reg;
QTOUCH_PTC->BURSTMODE.reg = 0xA4;
sync_config();
uint16_t result = startPtcAcquire();
QTOUCH_PTC->BURSTMODE.reg = BURSTMODE_REG_BACKUP;
sync_config();
return result;
}
Basically I backup QTOUCH_PTC->BURSTMODE.reg
and restore its value after startPtcAcquire
. It seems to work. I have no idea what I'm doing and I didn't find any document about the BURSTMODE register.
from adafruit_circuitplayground.
there's no documentation - we reverse engineered it from decompiling, so not surprising theres bugs :) can you please submit a PR?
from adafruit_circuitplayground.
Related Issues (20)
- soundPressureLevel() intermittently returns 'inf' at low levels on AVR HOT 4
- Example programs broken HOT 1
- C:\Users\Dr.Zahid\Documents\Arduino\libraries\Adafruit_Circuit_Playground\utility\Adafruit_CPlay_Mic.cpp: In member function 'void Adafruit_CPlay_Mic::capture(int16_t*, uint16_t)': C:\Users\Dr.Zahid\Documents\Arduino\libraries\Adafruit_Circuit_Playground\utility\Adafruit_CPlay_Mic.cpp:68:37: error: 'analogPinToChannel' was not declared in this scope channel = analogPinToChannel(4); // Pin A4 to ADC channel ^ exit status 1 Error compiling for board Arduino Nano. HOT 2
- Having trouble with the Speech examples HOT 14
- bug in Adafruit_CPlay_Speaker::set() HOT 5
- Memory allocation error on CPX HOT 2
- Adafruit_SleepyDog.h not found when compiling megademo example. HOT 5
- External neo pixel using pin A1 doesnโt work
- CircuitPlayground.readCap() breaks Adafruit_NeoPixel_ZeroDMA on CPX HOT 7
- redLed() no longer working for CPC HOT 6
- Speaker on/off broken on CPX HOT 4
- Preprocessor mismatch for CPX HOT 2
- Arduino Updater is always showing 1.86 New Version available HOT 11
- Capacitive touch not working on Bluefruit Playground HOT 2
- Add example for using external NeoPixels HOT 2
- Package discription is no longer accurate. HOT 3
- No implementation for sendRAW HOT 1
- Cap Touch samples not being used with FreeTouch HOT 1
- Bluefruit CP - cap touch sound demo does not seem to work when pushing the sensors, though it will play the series of tones.
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 adafruit_circuitplayground.