wobblyhead hg > arduino > Potentiometer
diff Potentiometer.cpp @ 5:ea44b28e12ab
1.0.2 update - setup now resets the object
| author | ark |
|---|---|
| date | 2017-06-22 01:42 +0200 |
| parents | a5e06e87f081 |
| children | 4e32bc18a7f7 |
line wrap: on
line diff
--- a/Potentiometer.cpp Fri Jun 02 22:09:56 2017 +0200 +++ b/Potentiometer.cpp Thu Jun 22 01:42:31 2017 +0200 @@ -1,9 +1,4 @@ -#if defined(ARDUINO) && ARDUINO >= 100 #include "Arduino.h" -#else -#include "WProgram.h" -#endif - #include "Potentiometer.h" @@ -16,6 +11,10 @@ void Potentiometer::setup(byte pin) { this->pin = pin; pinMode(this->pin, INPUT); + this->isStopped = false; + this->sum = 0.0; + this->avg = 0.0; + this->num = 0; } void Potentiometer::update() {
