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.
UltraSonidos.h
00001 #ifndef MBED_ULTRAS_H 00002 #define MBED_ULTRAS_H 00003 00004 #include "mbed.h" 00005 00006 /* 00007 Control de sensor de ultra Sonidos 00008 */ 00009 00010 class UltraSonidos { 00011 00012 public: 00013 /** Crea un objeto SensorUltrasonidos connectado a un pin digitalinout 00014 * 00015 * @param pin PinINOUt pin to connect to 00016 */ 00017 UltraSonidos(PinName pin); 00018 00019 00020 /** Lee la distancia en cm 00021 * 00022 * @param returns A debuelve un entero con los cm. 00023 */ 00024 long read(); 00025 private: 00026 int pulseIn(DigitalInOut& pingPin); 00027 long microsegundosAcentimetros(long microseconds); 00028 00029 protected: 00030 DigitalInOut _pinDigital; 00031 00032 }; 00033 00034 #endif
Generated on Wed Jul 13 2022 23:40:27 by
1.7.2