coucou

Dependencies:   HC_SR04_Ultrasonic_Library mbed

Files at this revision

API Documentation at this revision

Comitter:
mathieusab
Date:
Wed Sep 28 14:16:26 2016 +0000
Child:
1:3bad1115bf14
Commit message:
coucou

Changed in this revision

HC_SR04_Ultrasonic_Library.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HC_SR04_Ultrasonic_Library.lib	Wed Sep 28 14:16:26 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/ejteb/code/HC_SR04_Ultrasonic_Library/#e0f9c9fb4cf3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Sep 28 14:16:26 2016 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+#include "ultrasonic.h"
+
+
+PinName trig = PA_10;
+PinName echo = PA_9;
+float updateSpeed = 1; // 1 Hz, 1 fois par sec
+float timeout = 2;
+
+
+int mesure = 0;
+
+int main() 
+{
+    
+ultrasonic(trig, echo, updateSpeed, timeout);
+
+    while(1) 
+    {
+        mesure = getCurrentDistance();
+        wait(0.1);
+        printf("%d\n",mesure);
+        wait(0.1);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Sep 28 14:16:26 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/abea610beb85
\ No newline at end of file