Geschwindigkeitesregelung durch den Ultraschallsensor

Dependencies:   BertlLib bertl_libraries mbed

Files at this revision

API Documentation at this revision

Comitter:
TFuchsbichler
Date:
Mon Apr 25 06:58:09 2016 +0000
Commit message:
;

Changed in this revision

BertlLib.lib Show annotated file Show diff for this revision Revisions of this file
bertl_libraries.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/BertlLib.lib	Mon Apr 25 06:58:09 2016 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/Lab-4CHEL/code/BertlLib/#01d2bc098b6d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bertl_libraries.lib	Mon Apr 25 06:58:09 2016 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/Lab-4CHEL/code/bertl_libraries/#46115ad78747
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Apr 25 06:58:09 2016 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+#include "Bertl14.h"
+#include "BertlObjects.h"
+#include "class_hardware.h"
+#include "pins_bertl.h"
+
+
+BusOut boardPow(PW_MOT, PW_IR, PW_ENC);
+
+Motor m_right(MR_PWM, MR_FWD, MR_REV);
+Motor m_left(ML_PWM, ML_FWD, ML_REV);
+
+USSensor usens(US_T,US_E);
+
+int main() {
+    boardPow=3;
+    InitBertl();
+    pex.useISR=0; leds=9;
+    pex.ClearLeds();
+    pex.WaitUntilButtonPressed();
+    pex.WaitUntilButtonPressed();
+    usens.initialize();
+    while(1) {
+        
+        int speed = ( usens.distance_mm - 80 ) * 1;
+        
+        m_left.set(speed);
+        m_right.set(speed);
+        
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Apr 25 06:58:09 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/082adc85693f
\ No newline at end of file