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: mbed QEI HIDScope BiQuad4th_order biquadFilter MODSERIAL FastPWM
Diff: main.cpp
- Revision:
- 16:ac4e3730f61f
- Parent:
- 15:40dd74bd48d1
- Child:
- 21:8798f776f778
--- a/main.cpp Thu Nov 01 21:57:28 2018 +0000 +++ b/main.cpp Fri Nov 02 08:05:30 2018 +0000 @@ -18,6 +18,8 @@ DigitalIn button_Emg(D3); DigitalIn buttonx(D2); //x EMG replacement DigitalIn buttony(D3); //y EMG replacement +DigitalIn buttondirx(D2); //x direction change +DigitalIn buttondiry(D3); //y direction change DigitalIn Fail_button(SW3); // Modserial MODSERIAL pc(USBTX, USBRX); @@ -847,10 +849,10 @@ StateMachine.attach(&ProcessStateMachine, 0.005f); // Run statemachine 200 times per second - InterruptIn buttonx(D2); - buttonx.fall(ChangeDirectionX); //change the direction of the setpoint in x direction - InterruptIn buttony(D3); - buttony.fall(ChangeDirectionY); //change the direction of the setpoint in y direction + InterruptIn buttondirx(D2); + + InterruptIn buttondiry(D3); + while (true) { @@ -887,6 +889,9 @@ else { need_to_move_2 = 0; } + + buttondirx.fall(ChangeDirectionX); //change the direction of the setpoint in x direction + buttondiry.fall(ChangeDirectionY); //change the direction of the setpoint in y direction } wait(0.5f);