Digigurdy-baz
Loading...
Searching...
No Matches
Public Member Functions | List of all members
BuzzKnob Class Reference

#include <buzzknob.h>

Public Member Functions

 BuzzKnob (int v_pin)
 Contructor. BuzzKnob handles the potentiometer knob that adjusts buzzing thresholds. More...
 
void update ()
 Checks knob for new reading. Self-timing: should be run every loop() cycle. More...
 
float getVoltage ()
 Gets the current voltage of the knob. More...
 
float getThreshold ()
 Gets the calculated velocity threshold based off the current voltage. More...
 

Constructor & Destructor Documentation

◆ BuzzKnob()

BuzzKnob::BuzzKnob ( int  v_pin)

Contructor. BuzzKnob handles the potentiometer knob that adjusts buzzing thresholds.

Parameters
v_pinThe active pin the potentiometer is attached to.
Warning
3.3V MAX!

Member Function Documentation

◆ getThreshold()

float BuzzKnob::getThreshold ( )

Gets the calculated velocity threshold based off the current voltage.

Returns
The buzzing velocity threshold.

◆ getVoltage()

float BuzzKnob::getVoltage ( )

Gets the current voltage of the knob.

Returns
The voltage, 0 = 0V, 1023 = 3.3V

◆ update()

void BuzzKnob::update ( )

Checks knob for new reading. Self-timing: should be run every loop() cycle.


The documentation for this class was generated from the following files: