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: Encoder MODSERIAL mbed
Revision 2:3987ed9570c8, committed 2013-11-04
- Comitter:
- gerjan
- Date:
- Mon Nov 04 14:54:13 2013 +0000
- Parent:
- 1:0db79ea80741
- Child:
- 3:0edffb90e739
- Commit message:
- code;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Nov 04 14:21:07 2013 +0000
+++ b/main.cpp Mon Nov 04 14:54:13 2013 +0000
@@ -53,6 +53,12 @@
//Tijd looptimer instellen.
Ticker looptimer;
looptimer.attach(setlooptimerflag,Ts);
+
+ motor1.setPosition(200);
+ motor2.setPosition(0);
+ x=0;
+ y=0;
+
// Oneidige loop...
@@ -60,8 +66,9 @@
while(looptimerflag != true);
looptimerflag = false;
- x = (potmeter1.read()*297.0+69.8)*-1.0;
- y = (potmeter2.read()*210.0+69.8);
+
+ x = (potmeter1.read()*297.0)*-1.0;
+ y = (potmeter2.read()*210.0);
//x = x*10.0 + 69.8;
//y = y*10.0 + 69.8;