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: HIDScope MODSERIAL QEI biquadFilter mbed
Revision 4:61d9325d7f2e, committed 2016-11-03
- Comitter:
- sivuu
- Date:
- Thu Nov 03 14:37:04 2016 +0000
- Parent:
- 3:56f31420abac
- Commit message:
- nu hopelijk met twee PID controllers en een werkende switch
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Nov 03 14:31:56 2016 +0000 +++ b/main.cpp Thu Nov 03 14:37:04 2016 +0000 @@ -5,7 +5,7 @@ #include "HIDScope.h" #include "math.h" -DigitalIn sw3(SW3); +InterruptIn sw3(SW3); DigitalIn sw2(SW2); DigitalIn encoder1A(D13); DigitalIn encoder1B(D12); @@ -155,7 +155,7 @@ float rev_counts_motor1; float rev_counts_motor2; // variabele coutns voor motor2 //t.attach(&tickerfunctie,ticker_TS); -sw3.attach(&SwitchN,Ts); +sw3.fall(&SwitchN); tick.attach(&reference,Ts); tick2.attach(&reference2,Ts); // ticker voor reference2 attach controllerticker.attach(&m1_controller,Ts);