42 pinMode(SENSOR_PIN, INPUT); // turn pin into an input and time till pin goes low
43 digitalWrite(SENSOR_PIN, LOW); // turn pullups off - or it won't work
44 rc_cued = false;
45 }
46if(digitalRead(SENSOR_PIN)){ // wait for pin to go low
47 result++;
48 }
49else{
50 output = result;
51 result = 0;
52 pinMode(SENSOR_PIN, OUTPUT); // make pin OUTPUT
53 digitalWrite(SENSOR_PIN, HIGH); // make pin HIGH to discharge capacitor - see the schematic
54 rc_cued = true;
55 }
56return output;
57 }
58
59private:
60unsignedint result;
61 boolean rc_cued;
62unsignedint output;
63
64 };
65
66#endif// #ifndef RCPOLL_H
Generated automatically using Doxygen. If info on this page is outdated, incomplete, or wrong, please open an issue at https://github.com/sensorium/Mozzi/issues