![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Programa para usar sensor MaxSonar EZ01 con la libreria MaxSonar
Revision 0:0915212278c6, committed 2014-03-27
- Comitter:
- migool
- Date:
- Thu Mar 27 23:31:23 2014 +0000
- Commit message:
- Revision commit to "senorpulse"
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MaxSonar.lib Thu Mar 27 23:31:23 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/migool/code/MaxSonar/#de1c628c1495
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Mar 27 23:31:23 2014 +0000 @@ -0,0 +1,15 @@ +#include "mbed.h" +#include "MaxSonar.h" +Serial pc(USBTX, USBRX); +MaxSonar sensor(PTD4); +float in; +float cm; + +int main() { + while(1) { + in=sensor.getinches(); + cm=sensor.getcm(); + pc.printf("in: %f, cm: %f", in,cm); + wait(2); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Mar 27 23:31:23 2014 +0000 @@ -0,0 +1,1 @@ +http://world3.dev.mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43 \ No newline at end of file