Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: TextLCD mbed PinDetect
Revision 6:902bec57d9ae, committed 2013-11-11
- 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 -----
