Iván Santos
/
santos_ej2_modulo3
santos_ej2_modulo3
Revision 1:9fb35f902a08, committed 2022-04-24
- Comitter:
- sedu_santos
- Date:
- Sun Apr 24 18:20:48 2022 +0000
- Parent:
- 0:12a8fb08eb52
- Commit message:
- aa
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 12a8fb08eb52 -r 9fb35f902a08 main.cpp --- a/main.cpp Sun Apr 24 17:54:57 2022 +0000 +++ b/main.cpp Sun Apr 24 18:20:48 2022 +0000 @@ -11,10 +11,10 @@ float c=ldr.read(); pc.printf("LDR READING = %4.2f \r\n", c); if (c<0.3) { - my_pwm.write(0.15); // Si la luminosidad es 0.3 o mayor, el servo se establece en 0.15 + my_pwm.write(0.15); // Si la luminosidad menor que 0.3, el servo se establece en 0.15 } else { - my_pwm.write(0.05); // Si la luminosidad menor que 0.3, el servo se establece 0.5 + my_pwm.write(0.05); // Si la luminosidad es 0.3 o mayor, el servo se establece en 0.05 } } }