eWolf 4 Regelung
/
Srf08Test
Ultraschall funktioniert
Revision 0:aef042479c18, committed 2017-01-17
- Comitter:
- rgiesecke
- Date:
- Tue Jan 17 15:33:28 2017 +0000
- Commit message:
- Ultraschall funktioniert
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SRF08.lib Tue Jan 17 15:33:28 2017 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/brentdekker/code/SRF08/#a11bd4ea3c18
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Jan 17 15:33:28 2017 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" +#include "SRF08.h" + +SRF08 Uschall(p9,p10,0xE4); +int Entfernung = 0; + + +int main() { + while(1) { + Uschall.startRanging(); + while (Uschall.rangingFinished() == 0) { + } + Entfernung = Uschall.getRange(); + printf("Entfernung: %d\n\r ", Entfernung); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Jan 17 15:33:28 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file