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: EMG1 PIDController1 compute mbed InBetweenController PinDetect QEI
Diff: main.cpp
- Revision:
- 4:e021dacffa24
- Parent:
- 3:0634f55c2021
- Child:
- 5:5339a7be9fb7
--- a/main.cpp Tue Oct 20 09:44:30 2015 +0000 +++ b/main.cpp Tue Oct 20 09:57:07 2015 +0000 @@ -5,8 +5,6 @@ // Define Objects Ticker sample_timer; -double lastA; -double lastB; void tick() { // EMG Reader @@ -15,13 +13,12 @@ double output2 = sample(2); // In Between Controller - double nexta, nextb; - newPos(output0, output2, output2, lastA, lastB, nexta, nextb); + double lastA, lastB, nextA, nextB; + getCurrent(lastA, lastB); + newPos(output0, output2, output2, lastA, lastB, nextA, nextB); - lastA = nexta; - lastB = nextb; - - move(nexta,nextb); + // Rotate the motors + move(nextA,nextB); } int main()