Controlling Blinking frequency using TSI Slider
Dependencies: mbed tsi_sensor
Revision 5:feab406f054b, committed 2016-11-14
- Comitter:
- sivaieee
- Date:
- Mon Nov 14 19:15:24 2016 +0000
- Parent:
- 4:fe602d6e48d9
- Commit message:
- Modified TSI Blinky
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r fe602d6e48d9 -r feab406f054b main.cpp --- a/main.cpp Thu Nov 03 19:38:24 2016 +0000 +++ b/main.cpp Mon Nov 14 19:15:24 2016 +0000 @@ -16,10 +16,11 @@ PwmOut led(LED_GREEN); TSIAnalogSlider tsi(ELEC0, ELEC1, 40); float x; - x = 0.0; + x = 0.1; while (true) { led = !led; wait(x); x = tsi.readPercentage(); + } }