Basic library for Pololu's Sharp GP2Y0A51SK0F

Dependencies:   mbed

Dependents:   GrabTest R5 2016 Robotics Team 1

Revision:
0:d03df6dd14d6
Child:
1:8db052ec94f1
diff -r 000000000000 -r d03df6dd14d6 DistanceSensor_Test.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DistanceSensor_Test.cpp	Wed Apr 06 23:02:33 2016 +0000
@@ -0,0 +1,16 @@
+#include "DistanceSensor.h"
+#include "mbed.h"
+
+int main()
+{
+    Serial pc(USBTX, USBRX);
+    DistanceSensor ds(PTB0);
+    
+    while(true)
+    {
+        pc.printf("                         \rDistance = %f cm", ds.getDistance());
+        wait(1);
+    }
+    
+    return 0;
+}
\ No newline at end of file