-
Notifications
You must be signed in to change notification settings - Fork 0
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
on 3217 using PC0 .. PC4 #2
Comments
Ok it works, but only with Arduino.h |
I was hoping to get it to work without the Arduino.h. |
I want to run your library complete without the Arduino crap, but it doesnt compile. Of course unmodified it works. But just with "#include <avr/interrupt.h>" it doesnt compile. I have 4 nodes with one Y and tried to code a slider. But it seems the value, regardless it can securely detect a touch, jump around after touches and are not stabilized in 512 range? |
Can you copy the error message on a failed compilation? In order to make it work, I need to know what is throwing the errors. I don't think I will be able to help with the sliders though, as I don't have a way to test it (no slider PCB). I can tell you however, that using self-capacitance on a slider is a bad idea, there will be too much noise. An X Line is highly recommended (See Mutual Example). If you cannot spare another Pin, consider driving the other nodes as shields (see corresponding Example). |
I use mutual capacitance :) ptc_add_mutualcap_node(&nodes[0], PIN_TO_PTC(PIN_PC1), PIN_TO_PTC(PIN_PC0)); But the calibration varies between nodes? I cannot get one node to 512, it idles at 590. And if i touch them they change their value only +- 20 ? |
How do you read out the values of the nodes? There are two calibration options by the way: 1 by capacitance. 2. by a reference. the function "ptc_get_node_delta(cap_sensor_t* node)" is the one you need to get the touch value minus reference. |
Ok thanks, i just do this now in the TWI ISR: switch (commandbyte) {
The result is like this: outer:0 center:590 right:0 left:0 So it seems one has no reference? |
This looks like a calibration error. or check for this event callbacks
|
Ok it tells me "Calib error, Cc too low." :( The slider is indeed quiet small |
consider using the shield option
etc... |
Well we need to use mutual cap. Btw we redesigned the slider and give it a next try. Ok, adjusted. Can u verify that your analog read of pins work while ptc is suspended? Made it work without Arduino.h, we just needed to make a dummy function for the arg function. |
Alright, I've pushed an update to make it compile in Microchip studio at least. The Dummy functions might require Link Time Optimizations enabled (-flto). |
Well couldnt get it to work with ADC0, using ADC1 now on 3217. That works :) |
Tried the library on a 3217 and just get 0x00 reading (but no pointer issue) ?
The text was updated successfully, but these errors were encountered: