22 template <
unsigned char SENSOR_PIN>
29 RCpoll():result(0),rc_cued(true), output(0)
42 pinMode(SENSOR_PIN, INPUT);
43 digitalWrite(SENSOR_PIN, LOW);
46 if(digitalRead(SENSOR_PIN)){
52 pinMode(SENSOR_PIN, OUTPUT);
53 digitalWrite(SENSOR_PIN, HIGH);
A class for reading voltage on a digital pin, derived from http://arduino.cc/en/Tutorial/RCtime.
unsigned int next()
Checks whether the capacitor has charged, and returns how long it took for the most recent charge.