Digigurdy-baz
Loading...
Searching...
No Matches
buzzknob.h
Go to the documentation of this file.
1#ifndef BUZZKNOB_H
2#define BUZZKNOB_H
3
4#include <ADC.h>
5
6extern ADC* adc;
7
8class BuzzKnob {
9 private:
10 int voltage_pin;
11 static const int poll_interval = 5000;
12 int poll_counter;
13 int knob_voltage;
14 int last_poll_time;
15
16 elapsedMillis the_knob_timer;
17
18 public:
19 BuzzKnob(int v_pin);
20
21 void update();
22 float getVoltage();
23 float getThreshold();
24};
25#endif
ADC * adc
Definition: digigurdy-baz.ino:50
Definition: buzzknob.h:8
float getThreshold()
Gets the calculated velocity threshold based off the current voltage.
Definition: buzzknob.cpp:30
float getVoltage()
Gets the current voltage of the knob.
Definition: buzzknob.cpp:24
void update()
Checks knob for new reading. Self-timing: should be run every loop() cycle.
Definition: buzzknob.cpp:15