14 static const int num_samples = 500;
15 int samples[num_samples];
23 long int sample_total;
25 bool started_spinning;
26 bool stopped_spinning;
Definition: gearcrank.h:11
bool isDetected()
Reports whether or not there is a crank attached.
Definition: gearcrank.cpp:69
void beginPolling()
Begins ADC sampling of the crank's voltage pin.
Definition: gearcrank.cpp:29
bool isSpinning()
Reports if spinning is happening.
Definition: gearcrank.cpp:240
bool stoppedSpinning()
Reports if spinning has sotpped this update() cycle.
Definition: gearcrank.cpp:234
bool stoppedBuzzing()
Reports if buzzing has stopped.
Definition: gearcrank.cpp:252
void refreshBuzz()
Samples the buzz knob and determines if buzzing started and/or is continuing.
Definition: gearcrank.cpp:76
bool startedSpinning()
Reports if spinning has started this update() cycle.
Definition: gearcrank.cpp:228
bool startedBuzzing()
Reports if buzzing has begun.
Definition: gearcrank.cpp:246
void detect()
Determines if the crank is connected or not.
Definition: gearcrank.cpp:39
void update()
Samples the crank voltage.
Definition: gearcrank.cpp:138
ADC * adc
Definition: digigurdy-baz.ino:50