v1

Dependencies:   PinDetect TextLCD mbed

Fork of SunflowerMach1 by Milan Draganic

Files at this revision

API Documentation at this revision

Comitter:
mdraganic
Date:
Mon Nov 11 11:45:55 2013 +0000
Parent:
5:7e28f4b64a55
Child:
7:ac67f44120a5
Commit message:
gotov driver i tracker

Changed in this revision

MotorDrivers/Motor.cpp 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
--- a/MotorDrivers/Motor.cpp	Sat Nov 09 18:37:53 2013 +0000
+++ b/MotorDrivers/Motor.cpp	Mon Nov 11 11:45:55 2013 +0000
@@ -33,6 +33,7 @@
     positiveOut = 0;
     negativeOut = 0;
     direction = 0;
+    wait_ms(1000);
 }
 
 void Motor::movePositive() {
--- a/main.cpp	Sat Nov 09 18:37:53 2013 +0000
+++ b/main.cpp	Mon Nov 11 11:45:55 2013 +0000
@@ -1,8 +1,8 @@
 #include "mbed.h"
 #include "Motor.h"
 
-#define sensorStartTreshold     0.07
-#define sensorStopTreshold      0.02
+#define sensorStartTreshold     0.05
+#define sensorStopTreshold      0.01
 
 #define calibrateFactorSenzA    1
 #define calibrateFactorSenzB    0.97
@@ -67,6 +67,16 @@
 
     while(1) {
     
+        (*motorEl).movePositive();
+        (*motorAz).movePositive();
+        wait(5);
+        (*motorAz).moveNegative();
+        (*motorEl).moveNegative();
+        wait(3);
+        continue;
+
+    
+    
         readValuesForAveraging();
         
 // ----- azimut -----