智也 大野
/
mbed_ping
超音波センサー動作確認
Revision 0:f039b8066d21, committed 2017-03-17
- Comitter:
- tomoya123
- Date:
- Fri Mar 17 08:44:31 2017 +0000
- Commit message:
- ultrasonic
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Mar 17 08:44:31 2017 +0000 @@ -0,0 +1,18 @@ + #include "mbed.h" + #include "Ping.h" + + + Ping Pinger(p30); + + int main() { + float range; + + + while(1) { + Pinger.Send(); + wait_ms(30); + range = Pinger.Read_cm()/2.0; + wait(1.0); + printf("%0.1f\r\n",range); + } + } \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Mar 17 08:44:31 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/87f2f5183dfb \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ping2.lib Fri Mar 17 08:44:31 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/rosienej/code/Ping/#6996f66161d7