Added function to reset potentiometer
All checks were successful
Generate Documentation / build (push) Successful in 15s
All checks were successful
Generate Documentation / build (push) Successful in 15s
This commit is contained in:
@@ -23,3 +23,9 @@ bool debounceReadNC(int buttonPin);
|
||||
*
|
||||
*/
|
||||
void setPinModes();
|
||||
|
||||
/**
|
||||
* @brief Resets the potentiometer by setting the wiper all the way to the A pin
|
||||
*
|
||||
*/
|
||||
void resetPotentiometer();
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <commonFunctions.h>
|
||||
#include <potControlls.h>
|
||||
#include <constants.h>
|
||||
|
||||
unsigned long lastDebounceTime = 0;
|
||||
@@ -125,3 +126,16 @@ void setPinModes()
|
||||
digitalWrite(POT_CS, HIGH);
|
||||
digitalWrite(POT_UD, LOW);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Resets the potentiometer by setting the wiper all the way to the A pin
|
||||
*
|
||||
*/
|
||||
void resetPotentiometer()
|
||||
{
|
||||
// Reset the potentiometer
|
||||
for (int i = 0; i < 64; i++)
|
||||
{
|
||||
potIncrement();
|
||||
}
|
||||
}
|
||||
@@ -13,12 +13,7 @@ int oldUserVolume = userVolume;
|
||||
void setup()
|
||||
{
|
||||
setPinModes();
|
||||
|
||||
// Reset the potentiometer
|
||||
for (int i = 0; i < 64; i++)
|
||||
{
|
||||
potIncrement();
|
||||
}
|
||||
resetPotentiometer();
|
||||
}
|
||||
|
||||
void loop()
|
||||
|
||||
Reference in New Issue
Block a user