Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 |
--- 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
*/

