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.
Fork of PES by
Revision 13:7eba9911e196, committed 2017-04-19
- Comitter:
- itslinear
- Date:
- Wed Apr 19 15:57:28 2017 +0000
- Parent:
- 12:b9faf8637183
- Child:
- 14:7e330f65f26e
- Commit message:
- new
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| readCamera.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Apr 19 15:38:56 2017 +0000
+++ b/main.cpp Wed Apr 19 15:57:28 2017 +0000
@@ -44,7 +44,7 @@
int state = 0; // Diese Variable gibt an in welchem State man sich befindet
-
+ int tempState = 2;
while(1) {
@@ -68,7 +68,7 @@
state = 5;
}
if(readCamera() == 0){
- state = 2;
+ state = tempState;
}
@@ -79,6 +79,7 @@
pwmR = 0.4f;
time1 ++;
state = 1;
+ tempState = 2;
} else {
time1 = 0;
pwmL = 0.5f;
@@ -96,6 +97,7 @@
pwmR = 0.4f;
time2 ++;
state = 1;
+ tempState = 3;
} else {
time2 = 0;
pwmL = 0.5f;
@@ -119,12 +121,14 @@
pwmL = 0.55f;
pwmR = 0.45f;
}
+ state = 1;
break;
case 5: // Aufnehmen des Klotzes
pwmL = 0.5f;
pwmR = 0.5f;
+ state = 1;
break;
--- a/readCamera.h Wed Apr 19 15:38:56 2017 +0000 +++ b/readCamera.h Wed Apr 19 15:57:28 2017 +0000 @@ -3,6 +3,8 @@ #include <mbed.h> #include "Pixy.h" +#include "PixyLink.h" +#include "PixyLinkI2C.h" int readCamera();
