Lehrer Busch
/
xxx_Sonar-HC-SR04
xxx_Sonar-HC-SR04
Revision 1:1e73871289d7, committed 2022-02-23
- Comitter:
- itbusch
- Date:
- Wed Feb 23 19:20:31 2022 +0000
- Parent:
- 0:b0a3597dffa9
- Commit message:
- xxx_Sonar-HC-SR04
Changed in this revision
--- a/main.cpp Thu Feb 05 19:04:15 2015 +0000 +++ b/main.cpp Wed Feb 23 19:20:31 2022 +0000 @@ -4,14 +4,13 @@ DigitalOut myled(LED1); Serial pc(USBTX,USBRX); -HCSR04 sonar(A2, D12); +HCSR04 sonar(D2, D4); //Trigger, Echo int main() { printf("INICIO PROGRAMA\n"); while(1) { - printf("Distancia detectada pelo sensor Frente %.2f cm \n", sonar.getCm()); - wait_ms(1000); - printf("Distancia detectada pelo sensor Frente %.2f in \n", sonar.getIn()); + printf("Distanz %.2f cm \n\r", sonar.getCm()); + pc.printf("Distancia %.2f cm \n\r",sonar.getCm()); wait_ms(1000); } } \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Wed Feb 23 19:20:31 2022 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#b1796dedeb8accde1cbaecf136fab96895e23d81
--- a/mbed.bld Thu Feb 05 19:04:15 2015 +0000 +++ b/mbed.bld Wed Feb 23 19:20:31 2022 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/e188a91d3eaa \ No newline at end of file +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file