Bチーム
/
mbed_blinky
test
Revision 0:135359aef760, committed 2014-06-10
- Comitter:
- ryuna
- Date:
- Tue Jun 10 09:12:52 2014 +0000
- Commit message:
- test
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Ping.lib Tue Jun 10 09:12:52 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/rosienej/code/Ping/#6996f66161d7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Jun 10 09:12:52 2014 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" +#include "Ping.h" + +Serial pc(USBTX,USBRX); +DigitalOut myled(LED1); +Ping PING(p21); + + +int main() { + int ping_data = 0; + + while(1) { + + PING.Send(); + wait_ms(30); + + ping_data = PING.Read_cm()/2; + + pc.printf("ping: %d\n",ping_data); + + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Jun 10 09:12:52 2014 +0000 @@ -0,0 +1,1 @@ +http://world3.dev.mbed.org/users/mbed_official/code/mbed/builds/824293ae5e43 \ No newline at end of file