KL25Z TSI library
Dependents: AirMouse FRDM_Deco KL25Z_DCF77_HY-1_8LCD FRDM_TSI ... more
Revision 2:507b1f67804b, committed 2012-10-12
- Comitter:
- chris
- Date:
- Fri Oct 12 11:42:12 2012 +0000
- Parent:
- 1:4dd9262cac47
- Commit message:
- Tidied up formatting
Changed in this revision
TSISensor.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4dd9262cac47 -r 507b1f67804b TSISensor.h --- a/TSISensor.h Thu Oct 11 14:00:48 2012 +0000 +++ b/TSISensor.h Fri Oct 12 11:42:12 2012 +0000 @@ -30,17 +30,15 @@ * @code * #include "mbed.h" * #include "TSISensor.h" -* +* * int main(void) { -* DigitalOut led(LED_GREEN); -* TSISensor tsi; -* -* while (true) { -* printf("slider percentage: %f%\r\n", tsi.readPercentage()); -* printf("slider distance: %dmm\r\n", tsi.readDistance()); -* wait(1); -* led = !led; -* } +* PwmOut led(LED_GREEN); +* TSISensor tsi; +* +* while (true) { +* led = 1.0 - tsi.readPercentage(); +* wait(0.1); +* } * } * @endcode */