Skip to content

Commit

Permalink
Merge pull request #15 from srwi/fix-potentiometer-pin-usage
Browse files Browse the repository at this point in the history
Fix usage of potentiometer pin (#13)
  • Loading branch information
srwi committed Mar 7, 2023
2 parents c0039f1 + 9ceab7d commit fe24a4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FastLEDHub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void FastLEDHubClass::handleInput()
{
// Adjust the range slightly so low and high adc values
// span the whole 10bit brightness range
int16_t potiBrightness = (1023 - analogRead(A0) - 29) * 1.06;
int16_t potiBrightness = (1023 - analogRead(m_potentiometerPin) - 29) * 1.06;
potiBrightness = constrain(potiBrightness, 0, 1023);

// Low pass filter the potentiometer value to smoothen it out
Expand Down

0 comments on commit fe24a4e

Please sign in to comment.