Digigurdy-baz
Loading...
Searching...
No Matches
vibknob.h
Go to the documentation of this file.
1#ifndef VIBKNOB_H
2#define VIBKNOB_H
3
4#include <ADC.h>
5
6#include "common.h"
7#include "config.h"
8
9extern ADC* adc;
10
11class VibKnob{
12 private:
13 int voltage_pin;
14 float max_voltage = PEDAL_MAX_V;
15 int voltage;
16 bool enabled;
17
18 elapsedMillis vib_knob_timer;
19
20 public:
21 VibKnob(int v_pin);
22
23 void update();
24 int getVoltage();
25 int getVibrato();
26 void enable();
27 void disable();
28};
29#endif
Definition: vibknob.h:11
void disable()
Disabled this object. update() will not respond if the object is disabled.
Definition: vibknob.cpp:54
int getVibrato()
Report the current vibrato value, calculated based off the current voltage.
Definition: vibknob.cpp:36
int getVoltage()
Reports the current pin voltage.
Definition: vibknob.cpp:30
void enable()
Sets the enable flag for this object.
Definition: vibknob.cpp:49
void update()
Sample the voltage pin and set the appropriate amount of vibrato on the melody strings.
Definition: vibknob.cpp:17
const float PEDAL_MAX_V
The max voltage reported by the accessory pedal.
Definition: config.h:91
ADC * adc
Definition: digigurdy-baz.ino:50