for pymite

Dependents:   pymite pymite

Fork of TSI by Emilio Monti

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Fri Oct 12 11:42:12 2012 +0000
Parent:
1:4dd9262cac47
Child:
3:b867dca5f810
Commit message:
Tidied up formatting

Changed in this revision

TSISensor.h Show annotated file Show diff for this revision Revisions of this file
--- 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
 */