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.
Fork of FRDM_TSI by
main.cpp
00001 #include "mbed.h" 00002 #include "TSISensor.h" 00003 00004 00005 Serial pc(USBTX,USBRX); 00006 00007 00008 int main(void) { 00009 PwmOut led(LED_GREEN); 00010 TSISensor tsi; 00011 float percentage; 00012 // uint8_t distance; 00013 00014 while (true) { 00015 percentage=tsi.readPercentage(); 00016 //distance=tsi.readDistance(); 00017 //pc.printf("distance= %d , percentage= %f %% \n",distance,percentage); 00018 00019 led = 1.0 - percentage; 00020 wait(0.1); 00021 } 00022 }
Generated on Fri Jul 15 2022 20:18:27 by
1.7.2
