Closed s00500 closed 8 years ago
I can't troubleshoot ESP8266 problems. But if someone does solve this, please submit the fix as a pull request. As long as it only changes the ESP8266-specific code, I'll be happy to merge the fix.
@s00500 if you don't mind me asking, how did you have your circuit setup for this? Are you using the ADC pin?
No, I havn't been using D5 and D6 (GPIO 12 and 14)
@s00500 Hi I'm getting an Exception (29) on the esp8266 too. Did you resolve this problem with CapacitiveSensor or you have found another code for the ESP8266?
@androcioli no i've been using way simpler code to do this.
@s00500 Do you can making the code available you're using?
Open CapacitiveSensor.h... find lines 95 - 104... and refresh them with that:
@BorisWild @PaulStoffregen I somehow can't get this to work for me with my ESP8266-12E, it always throws a timeout (-2). This is my code:
#include <CapacitiveSensor.h>
CapacitiveSensor csense = CapacitiveSensor(12, 14);
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println(csense.capacitiveSensor(30));
}
I'm using the latest library version cloned from GitHub.
I have a 10MOhm resistor wired up to pin 12, and a 1KOhm resistor to pin 14. They are soldered together on a 1cm (2.54 cm)*1cm (2.54 cm) sheet of copper tape. Do I have to search the error in the code or in the wiring? Btw, if I short the pins with my finger, the value gets to zero, when removing the finger it jumps up to sub-100, but then immediately goes back to -2.
Too big resistors.
3 нояб. 2016 г. 1:22 пользователь "Max Rumpf" notifications@github.com написал:
@BorisWild https://github.com/BorisWild I somehow can't get it to work for me, it always throws a timeout (-2). This is my code:
include
CapacitiveSensor csense = CapacitiveSensor(12, 14);
void setup() { Serial.begin(115200); }
void loop() { Serial.println(csense.capacitiveSensor(30)); }
I have a 10MOhm resistor wired up to pin 12, and a 1KOhm resistor to pin
- They are soldered together on a 1cm*3cm sheet of copper tape. Do I have to search the error in the code or in the wiring?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PaulStoffregen/CapacitiveSensor/issues/6#issuecomment-258017533, or mute the thread https://github.com/notifications/unsubscribe-auth/AQkLDGOKaSZuJ4CrgVDDottQR6qqqpliks5q6Q0WgaJpZM4GIycg .
@BorisWild Well, example code said:
Uses a high value resistor e.g. 10M between send pin and receive pin Resistor effects sensitivity, experiment with values, 50K - 50M. Larger resistor values yield larger sensor values. Receive pin is the sensor pin - try different amounts of foil/metal on this pin
What values would you recommend for the ESP then? I want it to sense through a 2mm sheet of plastic, that's why I ask. Thanks for your help! :)
Ok, I tested my resistor values on an Arduino Mega, where they work fine. Now I just need to adapt them to my ESP8266.
Came here for the same problem as Maxr1998, but found out that in my case reason for the error was different: The library does not support GPIO16 on the ESP8266.
I use a 10K resistor for direct touch sensing.
Forgot to update, it also works for me now, with a 100k to 200k resistor through a 1mm layer of plastic.
Hi I'm getting an Exception (29) on the esp8266-12E (NodeMCU DevBoard v1.0 "Amica") Here is the error: