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: biquadFilter MODSERIAL QEI Servo mbed
Fork of Robot_Battle_met_ARVID by
Revision 12:99e29b8d4155, committed 2018-11-01
- Comitter:
- cmaas
- Date:
- Thu Nov 01 17:51:37 2018 +0000
- Parent:
- 11:4ee7f6d482f4
- Child:
- 13:0e25698dce40
- Commit message:
- Control ticker + EMG ticker work in tandem
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Nov 01 17:41:25 2018 +0000
+++ b/main.cpp Thu Nov 01 17:51:37 2018 +0000
@@ -48,8 +48,8 @@
// PID CONTROLLER -- PIN DEFENITIONS
-AnalogIn button3(A4);
-AnalogIn button4(A5);
+//AnalogIn button3(A4);
+//AnalogIn button4(A5);
DigitalOut directionpin1(D7); // motor 1
DigitalOut directionpin2(D4); // motor 2
@@ -720,8 +720,8 @@
led3 = 1;
pwmpin1.period_us(60); // setup motor
- ref_rot.attach(Motor_mover, 0.1f);// HAS TO GO TO STATE MACHINE
- movement_ticker_activator()
+ ref_rot.attach(Motor_mover, 0.01f);// HAS TO GO TO STATE MACHINE
+ movement_ticker_activator();
while (true) {
//ProcessStateMachine();
@@ -741,7 +741,7 @@
float py = positiony(0,0); // EMG: +y, -y
//printf("positie (%f,%f)\n\r",px,py);
}
-
+/*
if (button3 == false) {
wait(0.01f);
// berekenen positie
@@ -757,7 +757,7 @@
float py = positiony(0,1); // EMG: +y, -y
//printf("positie (%f,%f)\n\r",px,py);
}
-
+*/
}
}
