Dit is het actieve stuurprogramma, behorend bij de bacheloropdracht van Menno Sytsma over de integratie van een Twisted string actuator in een handorthese
Dependencies: EMG FastPWM HIDScope mbed-src
Diff: main.cpp
- Revision:
- 4:aaccb2782849
- Parent:
- 2:f5bb7fcfc7a2
- Child:
- 5:d1c6f7fef412
--- a/main.cpp Thu Jun 09 15:34:51 2016 +0000 +++ b/main.cpp Fri Jun 17 07:34:18 2016 +0000 @@ -69,7 +69,7 @@ // The data read and send function void scopeSend() { - scope.set(0,Force_nieuw); + scope.set(0,Ref2); //Force_nieuw); scope.set(1,Y_filtder); scope.set(2,Plaats_der); scope.set(3,Input); @@ -93,7 +93,7 @@ { double Y= 787.3008916207206*pow(A,4) -565.1143141517078*pow(A,3) + 122.8516837382677*pow(A,2) + 0.0556616744031*A + 0.0912411880277; Referentie2 = Filter4.step(Y); - if (Referentie2<=2.5 or Referentie2>=9.2) { + if (Referentie2<=3.0 or Referentie2>=9.2) { Led = 0; Referentie2 = B; } @@ -197,7 +197,7 @@ motor1speed = 0.2+fabs(Output); } else if (Output<0) { motor1direction.write(0); - motor1speed = 0.05*fabs(Output); + motor1speed = 0.01*fabs(Output); } }