small noise reduction fix

This commit is contained in:
Daniella / Tove 2023-04-30 16:03:56 +02:00 committed by GitHub
parent dce7aa4581
commit 0bcc06449a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,9 +102,8 @@ void setup() {
//float m = 0; //float m = 0;
void loop() { void loop() {
float v = ((float) analogRead(26) / 4096.0 * 7 * 100.0); float v = ((float) analogRead(26) / 4096.0 * 6 * 100.0 + 10);
pwm->setPWM_DCPercentage_manual(15, v); pwm->setPWM_DCPercentage_manual(15, v);
v *= 2;
led->setPWM_DCPercentage_manual(LED_BUILTIN, v); led->setPWM_DCPercentage_manual(LED_BUILTIN, v);
//n = n + 1; //n = n + 1;
//if(m < v) { m = v; } //if(m < v) { m = v; }
@ -115,6 +114,3 @@ void loop() {
//m = 0; //m = 0;
//} //}
} }