for pymite

Dependents:   pymite pymite

Fork of TSI by Emilio Monti

Revision:
2:507b1f67804b
Parent:
1:4dd9262cac47
--- 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
 */