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: Encoder HIDScope MODSERIAL biquadFilter mbed
Fork of States_ikwordgek by
main.cpp@14:a861ba49107c, 2017-11-01 (annotated)
- Committer:
 - paulineoonk
 - Date:
 - Wed Nov 01 21:29:46 2017 +0000
 - Revision:
 - 14:a861ba49107c
 - Parent:
 - 13:3351f4374885
 - Child:
 - 15:1cfe58aea10d
 
Is er iets verandert?; Ja, de state machine is toegevoegd en EMG is hierin verwerkt.; calibratie motor moet positie/snelheid nog wel worden toegevoegd.
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| Miriam | 0:d5fb29bc0847 | 1 | //libaries | 
| Miriam | 0:d5fb29bc0847 | 2 | #include "mbed.h" | 
| Miriam | 0:d5fb29bc0847 | 3 | #include "BiQuad.h" | 
| Miriam | 0:d5fb29bc0847 | 4 | #include "HIDScope.h" | 
| Miriam | 0:d5fb29bc0847 | 5 | #include "encoder.h" | 
| Miriam | 0:d5fb29bc0847 | 6 | #include "MODSERIAL.h" | 
| Miriam | 0:d5fb29bc0847 | 7 | |
| paulineoonk | 14:a861ba49107c | 8 | //State Machine | 
| paulineoonk | 14:a861ba49107c | 9 | enum States (Cal1, Cal2, CalEMG, Home, EMG, Rest, Demo); | 
| paulineoonk | 14:a861ba49107c | 10 | int State, Counter; | 
| paulineoonk | 14:a861ba49107c | 11 | bool Position_controller_on; | 
| paulineoonk | 14:a861ba49107c | 12 | double Looptime = 0.002f; | 
| paulineoonk | 14:a861ba49107c | 13 | |
| paulineoonk | 3:36e706d6b3d2 | 14 | //globalvariables Motor | 
| paulineoonk | 3:36e706d6b3d2 | 15 | Ticker Treecko; //We make a awesome ticker for our control system | 
| paulineoonk | 8:c4ec359af35d | 16 | Ticker printer; | 
| paulineoonk | 8:c4ec359af35d | 17 | //PwmOut M1E(D6); //Biorobotics Motor 1 PWM control of the speed | 
| paulineoonk | 8:c4ec359af35d | 18 | //DigitalOut M1D(D7); //Biorobotics Motor 1 diraction control | 
| Miriam | 0:d5fb29bc0847 | 19 | |
| paulineoonk | 8:c4ec359af35d | 20 | //Encoder motor1(D13,D12,true); | 
| paulineoonk | 3:36e706d6b3d2 | 21 | MODSERIAL pc(USBTX,USBRX); | 
| paulineoonk | 3:36e706d6b3d2 | 22 | |
| paulineoonk | 8:c4ec359af35d | 23 | //double PwmPeriod = 1.0/5000.0; //set up of PWM periode (5000 Hz, want 5000 periodes in 1 seconde) | 
| paulineoonk | 3:36e706d6b3d2 | 24 | const double Ts = 0.1; // tickettijd/ sample time | 
| paulineoonk | 8:c4ec359af35d | 25 | //double e_prev = 0; | 
| paulineoonk | 8:c4ec359af35d | 26 | //double e_int = 0; | 
| paulineoonk | 6:e0e5da2c068f | 27 | double tijdstap = 0.002; | 
| paulineoonk | 8:c4ec359af35d | 28 | volatile double LBF; | 
| paulineoonk | 8:c4ec359af35d | 29 | volatile double RBF; | 
| paulineoonk | 8:c4ec359af35d | 30 | volatile double LTF; | 
| paulineoonk | 8:c4ec359af35d | 31 | volatile double RTF; | 
| Miriam | 0:d5fb29bc0847 | 32 | |
| paulineoonk | 7:05c71a859d27 | 33 | //buttons en leds voor calibration | 
| paulineoonk | 7:05c71a859d27 | 34 | DigitalIn button1(PTA4); | 
| paulineoonk | 9:285499f48cdd | 35 | |
| paulineoonk | 8:c4ec359af35d | 36 | DigitalOut ledred(LED_RED); | 
| paulineoonk | 7:05c71a859d27 | 37 | DigitalOut ledblue(LED_BLUE); | 
| paulineoonk | 9:285499f48cdd | 38 | DigitalOut ledgreen(LED_GREEN); | 
| paulineoonk | 8:c4ec359af35d | 39 | |
| paulineoonk | 10:518a8617c86e | 40 | //MVC for calibration | 
| paulineoonk | 10:518a8617c86e | 41 | double MVCLB = 0; double MVCRB = 0; double MVCLT = 0; double MVCRT = 0; | 
| paulineoonk | 10:518a8617c86e | 42 | //MEAN for calibration - rest | 
| paulineoonk | 10:518a8617c86e | 43 | double RESTMEANLB = 0; double RESTMEANRB =0; double RESTMEANLT = 0; double RESTMEANRT = 0; | 
| paulineoonk | 9:285499f48cdd | 44 | |
| paulineoonk | 10:518a8617c86e | 45 | double emgMEANSUBLB;double emgMEANSUBRB ;double emgMEANSUBLT ;double emgMEANSUBRT ; | 
| paulineoonk | 10:518a8617c86e | 46 | double emgSUMLB;double emgSUMRB;double emgSUMLT;double emgSUMRT; | 
| paulineoonk | 10:518a8617c86e | 47 | |
| paulineoonk | 8:c4ec359af35d | 48 | |
| paulineoonk | 7:05c71a859d27 | 49 | bool caldone = false; | 
| paulineoonk | 8:c4ec359af35d | 50 | int CalibrationSample = 1000; //How long will we calibrate? Timersampletime*Calibrationsample | 
| paulineoonk | 8:c4ec359af35d | 51 | |
| paulineoonk | 9:285499f48cdd | 52 | int Timescalibration = 0; | 
| paulineoonk | 10:518a8617c86e | 53 | int TimescalibrationREST = 0; | 
| paulineoonk | 10:518a8617c86e | 54 | |
| Miriam | 0:d5fb29bc0847 | 55 | |
| paulineoonk | 9:285499f48cdd | 56 | // Biquad filters voor Left Bicep (LB) | 
| paulineoonk | 9:285499f48cdd | 57 | // Biquad filters van respectievelijk Notch, High-pass en Low-pass filter | 
| paulineoonk | 9:285499f48cdd | 58 | BiQuad N1LB( 8.63271e-01, -1.39680e+00, 8.63271e-01, -1.39680e+00, 7.26543e-01 ); | 
| paulineoonk | 9:285499f48cdd | 59 | BiQuadChain NFLB; | 
| paulineoonk | 9:285499f48cdd | 60 | BiQuad HP1LB( 9.63001e-01, -9.62990e-01, 0.00000e+00, -9.62994e-01, 0.00000e+00 ); | 
| paulineoonk | 9:285499f48cdd | 61 | BiQuad HP2LB( 1.00000e+00, -2.00001e+00, 1.00001e+00, -1.96161e+00, 9.63007e-01 ); | 
| paulineoonk | 9:285499f48cdd | 62 | BiQuadChain HPFLB; | 
| paulineoonk | 9:285499f48cdd | 63 | BiQuad LP1LB( 2.56971e-06, 2.56968e-06, 0.00000e+00, -9.72729e-01, 0.00000e+00 ); | 
| paulineoonk | 9:285499f48cdd | 64 | BiQuad LP2LB( 1.00000e+00, 2.00001e+00, 1.00001e+00, -1.97198e+00, 9.72734e-01 ); | 
| paulineoonk | 9:285499f48cdd | 65 | BiQuadChain LPFLB; | 
| paulineoonk | 9:285499f48cdd | 66 | |
| paulineoonk | 9:285499f48cdd | 67 | // Biquad filters voor Right Bicep (RB) | 
| Miriam | 0:d5fb29bc0847 | 68 | // Biquad filters van respectievelijk Notch, High-pass en Low-pass filter | 
| paulineoonk | 9:285499f48cdd | 69 | BiQuad N1RB( 8.63271e-01, -1.39680e+00, 8.63271e-01, -1.39680e+00, 7.26543e-01 ); | 
| paulineoonk | 9:285499f48cdd | 70 | BiQuadChain NFRB; | 
| paulineoonk | 9:285499f48cdd | 71 | BiQuad HP1RB( 9.63001e-01, -9.62990e-01, 0.00000e+00, -9.62994e-01, 0.00000e+00 ); | 
| paulineoonk | 9:285499f48cdd | 72 | BiQuad HP2RB( 1.00000e+00, -2.00001e+00, 1.00001e+00, -1.96161e+00, 9.63007e-01 ); | 
| paulineoonk | 9:285499f48cdd | 73 | BiQuadChain HPFRB; | 
| paulineoonk | 9:285499f48cdd | 74 | BiQuad LP1RB( 2.56971e-06, 2.56968e-06, 0.00000e+00, -9.72729e-01, 0.00000e+00 ); | 
| paulineoonk | 9:285499f48cdd | 75 | BiQuad LP2RB( 1.00000e+00, 2.00001e+00, 1.00001e+00, -1.97198e+00, 9.72734e-01 ); | 
| paulineoonk | 9:285499f48cdd | 76 | BiQuadChain LPFRB; | 
| paulineoonk | 9:285499f48cdd | 77 | |
| paulineoonk | 9:285499f48cdd | 78 | // Biquad filters voor Left Tricep (LT) | 
| paulineoonk | 9:285499f48cdd | 79 | // Biquad filters van respectievelijk Notch, High-pass en Low-pass filter | 
| paulineoonk | 9:285499f48cdd | 80 | BiQuad N1LT( 8.63271e-01, -1.39680e+00, 8.63271e-01, -1.39680e+00, 7.26543e-01 ); | 
| paulineoonk | 9:285499f48cdd | 81 | BiQuadChain NFLT; | 
| paulineoonk | 9:285499f48cdd | 82 | BiQuad HP1LT( 9.63001e-01, -9.62990e-01, 0.00000e+00, -9.62994e-01, 0.00000e+00 ); | 
| paulineoonk | 9:285499f48cdd | 83 | BiQuad HP2LT( 1.00000e+00, -2.00001e+00, 1.00001e+00, -1.96161e+00, 9.63007e-01 ); | 
| paulineoonk | 9:285499f48cdd | 84 | BiQuadChain HPFLT; | 
| paulineoonk | 9:285499f48cdd | 85 | BiQuad LP1LT( 2.56971e-06, 2.56968e-06, 0.00000e+00, -9.72729e-01, 0.00000e+00 ); | 
| paulineoonk | 9:285499f48cdd | 86 | BiQuad LP2LT( 1.00000e+00, 2.00001e+00, 1.00001e+00, -1.97198e+00, 9.72734e-01 ); | 
| paulineoonk | 9:285499f48cdd | 87 | BiQuadChain LPFLT; | 
| paulineoonk | 9:285499f48cdd | 88 | |
| paulineoonk | 9:285499f48cdd | 89 | // Biquad filters voor Left Tricep (RT) | 
| paulineoonk | 9:285499f48cdd | 90 | // Biquad filters van respectievelijk Notch, High-pass en Low-pass filter | 
| paulineoonk | 9:285499f48cdd | 91 | BiQuad N1RT( 8.63271e-01, -1.39680e+00, 8.63271e-01, -1.39680e+00, 7.26543e-01 ); | 
| paulineoonk | 9:285499f48cdd | 92 | BiQuadChain NFRT; | 
| paulineoonk | 9:285499f48cdd | 93 | BiQuad HP1RT( 9.63001e-01, -9.62990e-01, 0.00000e+00, -9.62994e-01, 0.00000e+00 ); | 
| paulineoonk | 9:285499f48cdd | 94 | BiQuad HP2RT( 1.00000e+00, -2.00001e+00, 1.00001e+00, -1.96161e+00, 9.63007e-01 ); | 
| paulineoonk | 9:285499f48cdd | 95 | BiQuadChain HPFRT; | 
| paulineoonk | 9:285499f48cdd | 96 | BiQuad LP1RT( 2.56971e-06, 2.56968e-06, 0.00000e+00, -9.72729e-01, 0.00000e+00 ); | 
| paulineoonk | 9:285499f48cdd | 97 | BiQuad LP2RT( 1.00000e+00, 2.00001e+00, 1.00001e+00, -1.97198e+00, 9.72734e-01 ); | 
| paulineoonk | 9:285499f48cdd | 98 | BiQuadChain LPFRT; | 
| paulineoonk | 9:285499f48cdd | 99 | |
| paulineoonk | 9:285499f48cdd | 100 | |
| paulineoonk | 7:05c71a859d27 | 101 | |
| paulineoonk | 7:05c71a859d27 | 102 | Timer looptime; //moetuiteindelijk weg | 
| paulineoonk | 6:e0e5da2c068f | 103 | |
| paulineoonk | 7:05c71a859d27 | 104 | //filters | 
| paulineoonk | 8:c4ec359af35d | 105 | double emgNotchLB; | 
| paulineoonk | 8:c4ec359af35d | 106 | double emgHPLB; | 
| paulineoonk | 8:c4ec359af35d | 107 | double emgAbsHPLB; | 
| paulineoonk | 8:c4ec359af35d | 108 | double emgLPLB; | 
| paulineoonk | 8:c4ec359af35d | 109 | |
| paulineoonk | 8:c4ec359af35d | 110 | double emgNotchRB; | 
| paulineoonk | 8:c4ec359af35d | 111 | double emgHPRB; | 
| paulineoonk | 8:c4ec359af35d | 112 | double emgAbsHPRB; | 
| paulineoonk | 8:c4ec359af35d | 113 | double emgLPRB; | 
| paulineoonk | 7:05c71a859d27 | 114 | |
| paulineoonk | 8:c4ec359af35d | 115 | double emgNotchLT; | 
| paulineoonk | 8:c4ec359af35d | 116 | double emgHPLT; | 
| paulineoonk | 8:c4ec359af35d | 117 | double emgAbsHPLT; | 
| paulineoonk | 8:c4ec359af35d | 118 | double emgLPLT; | 
| paulineoonk | 7:05c71a859d27 | 119 | |
| paulineoonk | 8:c4ec359af35d | 120 | double emgNotchRT; | 
| paulineoonk | 8:c4ec359af35d | 121 | double emgHPRT; | 
| paulineoonk | 8:c4ec359af35d | 122 | double emgAbsHPRT; | 
| paulineoonk | 8:c4ec359af35d | 123 | double emgLPRT; | 
| Miriam | 0:d5fb29bc0847 | 124 | |
| paulineoonk | 3:36e706d6b3d2 | 125 | double f = 500; // frequency | 
| paulineoonk | 3:36e706d6b3d2 | 126 | double dt = 1/f; // sample frequency | 
| paulineoonk | 8:c4ec359af35d | 127 | |
| paulineoonk | 8:c4ec359af35d | 128 | AnalogIn emgLB(A0); // EMG lezen | 
| paulineoonk | 8:c4ec359af35d | 129 | AnalogIn emgRB(A1); | 
| paulineoonk | 8:c4ec359af35d | 130 | AnalogIn emgLT(A2); | 
| paulineoonk | 8:c4ec359af35d | 131 | AnalogIn emgRT(A3); | 
| Miriam | 0:d5fb29bc0847 | 132 | |
| paulineoonk | 9:285499f48cdd | 133 | //float MVCLB = 0.3; | 
| paulineoonk | 9:285499f48cdd | 134 | //float MVCRB = 0.3; | 
| paulineoonk | 9:285499f48cdd | 135 | //float MVCLT = 0.3; | 
| paulineoonk | 9:285499f48cdd | 136 | //float MVCRT = 0.3; | 
| paulineoonk | 8:c4ec359af35d | 137 | |
| paulineoonk | 11:b46a4c48c08f | 138 | // variabelen changePosition | 
| paulineoonk | 11:b46a4c48c08f | 139 | int goalx, goaly; | 
| paulineoonk | 11:b46a4c48c08f | 140 | |
| paulineoonk | 8:c4ec359af35d | 141 | void Filteren() | 
| Miriam | 0:d5fb29bc0847 | 142 | { | 
| paulineoonk | 6:e0e5da2c068f | 143 | looptime.reset(); | 
| paulineoonk | 6:e0e5da2c068f | 144 | looptime.start(); | 
| paulineoonk | 8:c4ec359af35d | 145 | |
| paulineoonk | 8:c4ec359af35d | 146 | //EMG 1 | 
| paulineoonk | 8:c4ec359af35d | 147 | |
| paulineoonk | 10:518a8617c86e | 148 | emgNotchLB = NFLB.step(emgLB.read() ); // Notch filter | 
| paulineoonk | 10:518a8617c86e | 149 | emgHPLB = HPFLB.step(emgNotchLB); // High-pass filter: also normalises around 0. | 
| paulineoonk | 8:c4ec359af35d | 150 | emgAbsHPLB = abs(emgHPLB); // Take absolute value | 
| paulineoonk | 10:518a8617c86e | 151 | emgLPLB = LPFLB.step(emgAbsHPLB); // Low-pass filter: creates envelope | 
| paulineoonk | 10:518a8617c86e | 152 | emgMEANSUBLB = emgLPLB - RESTMEANLB; //substract the restmean value | 
| paulineoonk | 10:518a8617c86e | 153 | LBF = emgLPLB/MVCLB; // Scale to maximum signal: useful for motor. LBF should now be between 0-1. | 
| paulineoonk | 9:285499f48cdd | 154 | |
| paulineoonk | 10:518a8617c86e | 155 | emgNotchRB = NFRB.step(emgRB.read()); // Notch filter | 
| paulineoonk | 10:518a8617c86e | 156 | emgHPRB = HPFRB.step(emgNotchRB); // High-pass filter: also normalises around 0. | 
| paulineoonk | 8:c4ec359af35d | 157 | emgAbsHPRB = abs(emgHPRB); // Take absolute value | 
| paulineoonk | 10:518a8617c86e | 158 | emgLPRB = LPFRB.step(emgAbsHPRB); // Low-pass filter: creates envelope | 
| paulineoonk | 10:518a8617c86e | 159 | emgMEANSUBLB = emgLPLB - RESTMEANLB; | 
| paulineoonk | 9:285499f48cdd | 160 | RBF = emgLPRB/MVCRB; // Scale to maximum signal: useful for motor | 
| paulineoonk | 8:c4ec359af35d | 161 | |
| paulineoonk | 10:518a8617c86e | 162 | emgNotchLT = NFLT.step(emgLT.read() ); // Notch filter | 
| paulineoonk | 10:518a8617c86e | 163 | emgHPLT = HPFLT.step(emgNotchLT); // High-pass filter: also normalises around 0. | 
| paulineoonk | 8:c4ec359af35d | 164 | emgAbsHPLT = abs(emgHPLT); // Take absolute value | 
| paulineoonk | 10:518a8617c86e | 165 | emgLPLT = LPFLT.step(emgAbsHPLT); // Low-pass filter: creates envelope | 
| paulineoonk | 10:518a8617c86e | 166 | emgMEANSUBLT = emgLPLT - RESTMEANLT; //substract the restmean value | 
| paulineoonk | 9:285499f48cdd | 167 | LTF = emgLPLT/MVCLT; // Scale to maximum signal: useful for motor | 
| paulineoonk | 8:c4ec359af35d | 168 | |
| paulineoonk | 10:518a8617c86e | 169 | emgNotchRT = NFRT.step(emgRT.read() ); // Notch filter | 
| paulineoonk | 10:518a8617c86e | 170 | emgHPRT = HPFRT.step(emgNotchRT); // High-pass filter: also normalises around 0. | 
| paulineoonk | 8:c4ec359af35d | 171 | emgAbsHPRT = abs(emgHPRT); // Take absolute value | 
| paulineoonk | 10:518a8617c86e | 172 | emgLPRT = LPFRT.step(emgAbsHPRT); // Low-pass filter: creates envelope | 
| paulineoonk | 10:518a8617c86e | 173 | emgMEANSUBRT = emgLPRT - RESTMEANRT; //substract the restmean value | 
| paulineoonk | 9:285499f48cdd | 174 | RTF = emgLPRT/MVCRT; // Scale to maximum signal: useful for motor | 
| paulineoonk | 8:c4ec359af35d | 175 | |
| paulineoonk | 8:c4ec359af35d | 176 | //if (emgFiltered >1) | 
| paulineoonk | 8:c4ec359af35d | 177 | //{ | 
| paulineoonk | 8:c4ec359af35d | 178 | // emgFiltered=1.00; | 
| paulineoonk | 8:c4ec359af35d | 179 | //} | 
| paulineoonk | 8:c4ec359af35d | 180 | //pc.printf("emgreadLB = %f , emgFiltered = %f, maxi = %f, loop = %f \r\n, emgreadRB = %f , emgFiltered = %f, maxi = %f \r\n, emgreadLT = %f , emgFiltered = %f, maxi = %f \r\n, emgreadRT = %f , emgFiltered = %f, maxi = %f \r\n",emgLB.read(), LBF, maxiLB,looptime.read(),emgRB.read(), RBF, maxiRB,emgLT.read(), LTF, maxiLT, emgRT.read(), RTF, maxiRT); | 
| paulineoonk | 6:e0e5da2c068f | 181 | //int maxwaarde = 4096; // = 64x64 | 
| paulineoonk | 6:e0e5da2c068f | 182 | //double refP = emgFiltered*maxwaarde; | 
| paulineoonk | 6:e0e5da2c068f | 183 | //return refP; // value between 0 and 4096 | 
| paulineoonk | 9:285499f48cdd | 184 | |
| Miriam | 0:d5fb29bc0847 | 185 | } | 
| paulineoonk | 9:285499f48cdd | 186 | |
| paulineoonk | 10:518a8617c86e | 187 | void CalibrationEMG() | 
| paulineoonk | 7:05c71a859d27 | 188 | { | 
| paulineoonk | 7:05c71a859d27 | 189 | Timescalibration++; | 
| paulineoonk | 9:285499f48cdd | 190 | |
| paulineoonk | 10:518a8617c86e | 191 | if(Timescalibration<2000) | 
| paulineoonk | 9:285499f48cdd | 192 | { | 
| paulineoonk | 10:518a8617c86e | 193 | |
| paulineoonk | 10:518a8617c86e | 194 | emgNotchLB = NFLB.step(emgLB.read() ); | 
| paulineoonk | 10:518a8617c86e | 195 | emgHPLB = HPFLB.step(emgNotchLB); | 
| paulineoonk | 10:518a8617c86e | 196 | emgAbsHPLB = abs(emgHPLB); | 
| paulineoonk | 10:518a8617c86e | 197 | emgLPLB = LPFLB.step(emgAbsHPLB); | 
| paulineoonk | 10:518a8617c86e | 198 | emgSUMLB += emgLPLB; //SUM all rest values LB | 
| paulineoonk | 10:518a8617c86e | 199 | |
| paulineoonk | 11:b46a4c48c08f | 200 | emgNotchRB = NFRB.step(emgRB.read()); | 
| paulineoonk | 10:518a8617c86e | 201 | emgHPRB = HPFRB.step(emgNotchRB); | 
| paulineoonk | 10:518a8617c86e | 202 | emgAbsHPRB = abs(emgHPRB); | 
| paulineoonk | 10:518a8617c86e | 203 | emgLPRB = LPFRB.step(emgAbsHPRB); | 
| paulineoonk | 10:518a8617c86e | 204 | emgSUMRB += emgLPRB; //SUM all rest values RB | 
| paulineoonk | 10:518a8617c86e | 205 | |
| paulineoonk | 10:518a8617c86e | 206 | emgNotchLT = NFLT.step(emgLT.read() ); | 
| paulineoonk | 10:518a8617c86e | 207 | emgHPLT = HPFLT.step(emgNotchLT); | 
| paulineoonk | 10:518a8617c86e | 208 | emgAbsHPLT = abs(emgHPLT); | 
| paulineoonk | 10:518a8617c86e | 209 | emgLPLT = LPFLT.step(emgAbsHPLT); | 
| paulineoonk | 10:518a8617c86e | 210 | emgSUMLT += emgLPLT; //SUM all rest values LT | 
| paulineoonk | 10:518a8617c86e | 211 | |
| paulineoonk | 10:518a8617c86e | 212 | emgNotchRT = NFRT.step(emgRT.read() ); | 
| paulineoonk | 10:518a8617c86e | 213 | emgHPRT = HPFRT.step(emgNotchRT); | 
| paulineoonk | 10:518a8617c86e | 214 | emgAbsHPRT = abs(emgHPRT); | 
| paulineoonk | 10:518a8617c86e | 215 | emgLPRT = LPFRT.step(emgAbsHPRT); | 
| paulineoonk | 10:518a8617c86e | 216 | emgSUMRT += emgLPRT; //SUM all rest values RT | 
| paulineoonk | 10:518a8617c86e | 217 | } | 
| paulineoonk | 10:518a8617c86e | 218 | if(Timescalibration==1999) | 
| paulineoonk | 10:518a8617c86e | 219 | { | 
| paulineoonk | 10:518a8617c86e | 220 | RESTMEANLB = emgSUMLB/Timescalibration; //determine the mean rest value | 
| paulineoonk | 10:518a8617c86e | 221 | RESTMEANRB = emgSUMRB/Timescalibration; //determine the mean rest value | 
| paulineoonk | 10:518a8617c86e | 222 | RESTMEANRT = emgSUMRT/Timescalibration; //determine the mean rest value | 
| paulineoonk | 10:518a8617c86e | 223 | RESTMEANLT = emgSUMLT/Timescalibration; //determine the mean rest value | 
| paulineoonk | 10:518a8617c86e | 224 | } | 
| paulineoonk | 10:518a8617c86e | 225 | if(Timescalibration>2000 && Timescalibration<6000) | 
| paulineoonk | 10:518a8617c86e | 226 | { | 
| paulineoonk | 10:518a8617c86e | 227 | emgNotchLB = NFLB.step(emgLB.read() ); | 
| paulineoonk | 10:518a8617c86e | 228 | emgHPLB = HPFLB.step(emgNotchLB); | 
| paulineoonk | 10:518a8617c86e | 229 | emgAbsHPLB = abs(emgHPLB); | 
| paulineoonk | 10:518a8617c86e | 230 | emgLPLB = LPFLB.step(emgAbsHPLB); | 
| paulineoonk | 9:285499f48cdd | 231 | double emgfinalLB = emgLPLB; | 
| paulineoonk | 9:285499f48cdd | 232 | if (emgfinalLB > MVCLB) | 
| paulineoonk | 9:285499f48cdd | 233 | { //determine what the highest reachable emg signal is | 
| paulineoonk | 9:285499f48cdd | 234 | MVCLB = emgfinalLB; | 
| paulineoonk | 9:285499f48cdd | 235 | } | 
| paulineoonk | 9:285499f48cdd | 236 | } | 
| paulineoonk | 9:285499f48cdd | 237 | |
| paulineoonk | 10:518a8617c86e | 238 | if(Timescalibration>6000 && Timescalibration<10000) | 
| paulineoonk | 9:285499f48cdd | 239 | { | 
| paulineoonk | 10:518a8617c86e | 240 | emgNotchRB = NFRB.step(emgRB.read()); | 
| paulineoonk | 10:518a8617c86e | 241 | emgHPRB = HPFRB.step(emgNotchRB); | 
| paulineoonk | 10:518a8617c86e | 242 | emgAbsHPRB = abs(emgHPRB); | 
| paulineoonk | 10:518a8617c86e | 243 | emgLPRB = LPFRB.step(emgAbsHPRB); | 
| paulineoonk | 9:285499f48cdd | 244 | double emgfinalRB = emgLPRB; | 
| paulineoonk | 9:285499f48cdd | 245 | if (emgfinalRB > MVCRB) | 
| paulineoonk | 7:05c71a859d27 | 246 | { //determine what the highest reachable emg signal is | 
| paulineoonk | 9:285499f48cdd | 247 | MVCRB = emgfinalRB; | 
| paulineoonk | 9:285499f48cdd | 248 | } | 
| paulineoonk | 9:285499f48cdd | 249 | } | 
| paulineoonk | 9:285499f48cdd | 250 | |
| paulineoonk | 10:518a8617c86e | 251 | if(Timescalibration>10000 && Timescalibration<14000) | 
| paulineoonk | 9:285499f48cdd | 252 | { | 
| paulineoonk | 10:518a8617c86e | 253 | emgNotchLT = NFLT.step(emgLT.read() ); | 
| paulineoonk | 10:518a8617c86e | 254 | emgHPLT = HPFLT.step(emgNotchLT); | 
| paulineoonk | 10:518a8617c86e | 255 | emgAbsHPLT = abs(emgHPLT); | 
| paulineoonk | 10:518a8617c86e | 256 | emgLPLT = LPFLT.step(emgAbsHPLT); | 
| paulineoonk | 9:285499f48cdd | 257 | double emgfinalLT = emgLPLT; | 
| paulineoonk | 9:285499f48cdd | 258 | if (emgfinalLT > MVCLT) | 
| paulineoonk | 9:285499f48cdd | 259 | { //determine what the highest reachable emg signal is | 
| paulineoonk | 9:285499f48cdd | 260 | MVCLT = emgfinalLT; | 
| paulineoonk | 7:05c71a859d27 | 261 | } | 
| paulineoonk | 9:285499f48cdd | 262 | } | 
| paulineoonk | 9:285499f48cdd | 263 | |
| paulineoonk | 10:518a8617c86e | 264 | if(Timescalibration>14000 && Timescalibration<18000) | 
| paulineoonk | 9:285499f48cdd | 265 | { | 
| paulineoonk | 10:518a8617c86e | 266 | emgNotchRT = NFRT.step(emgRT.read() ); | 
| paulineoonk | 10:518a8617c86e | 267 | emgHPRT = HPFRT.step(emgNotchRT); | 
| paulineoonk | 10:518a8617c86e | 268 | emgAbsHPRT = abs(emgHPRT); | 
| paulineoonk | 10:518a8617c86e | 269 | emgLPRT = LPFRT.step(emgAbsHPRT); | 
| paulineoonk | 9:285499f48cdd | 270 | double emgfinalRT = emgLPRT; | 
| paulineoonk | 9:285499f48cdd | 271 | if (emgfinalRT > MVCRT) | 
| paulineoonk | 9:285499f48cdd | 272 | { //determine what the highest reachable emg signal is | 
| paulineoonk | 9:285499f48cdd | 273 | MVCRT = emgfinalRT; | 
| paulineoonk | 9:285499f48cdd | 274 | } | 
| paulineoonk | 9:285499f48cdd | 275 | } | 
| paulineoonk | 9:285499f48cdd | 276 | |
| paulineoonk | 10:518a8617c86e | 277 | if(Timescalibration>18000) | 
| paulineoonk | 7:05c71a859d27 | 278 | { | 
| paulineoonk | 7:05c71a859d27 | 279 | caldone=true; | 
| paulineoonk | 7:05c71a859d27 | 280 | } | 
| paulineoonk | 9:285499f48cdd | 281 | // pc.printf("maxi waarde = %f emgfinal = %f \r\n",maxi,emgfinal); | 
| paulineoonk | 9:285499f48cdd | 282 | //} | 
| paulineoonk | 7:05c71a859d27 | 283 | //PAS ALS DEZE TRUE IS, MOET DE MOTOR PAS BEWEGEN!!! | 
| paulineoonk | 7:05c71a859d27 | 284 | //return maxi; | 
| paulineoonk | 7:05c71a859d27 | 285 | } | 
| paulineoonk | 11:b46a4c48c08f | 286 | |
| paulineoonk | 11:b46a4c48c08f | 287 | double changePosition () | 
| paulineoonk | 11:b46a4c48c08f | 288 | { | 
| paulineoonk | 11:b46a4c48c08f | 289 | if (RBF>0.3) { | 
| paulineoonk | 11:b46a4c48c08f | 290 | goalx++; // hoe veel verder gaat hij? 1 cm? 10 cm? | 
| paulineoonk | 11:b46a4c48c08f | 291 | } | 
| paulineoonk | 11:b46a4c48c08f | 292 | if (RTF>0.3) { | 
| paulineoonk | 11:b46a4c48c08f | 293 | goalx--; | 
| paulineoonk | 11:b46a4c48c08f | 294 | } | 
| paulineoonk | 11:b46a4c48c08f | 295 | if (LBF>0.3) { | 
| paulineoonk | 11:b46a4c48c08f | 296 | goaly++; | 
| paulineoonk | 11:b46a4c48c08f | 297 | } | 
| paulineoonk | 11:b46a4c48c08f | 298 | if (LTF>0.3) { | 
| paulineoonk | 11:b46a4c48c08f | 299 | goaly--; | 
| paulineoonk | 11:b46a4c48c08f | 300 | } | 
| paulineoonk | 12:65b8d29bdd5d | 301 | pc.printf("goalx = %i, goaly = %i\r\n",goalx, goaly); | 
| paulineoonk | 14:a861ba49107c | 302 | // DIT MOET NOG HEEL ERG GETUNED WORDEN !!! | 
| paulineoonk | 11:b46a4c48c08f | 303 | } | 
| paulineoonk | 7:05c71a859d27 | 304 | |
| paulineoonk | 6:e0e5da2c068f | 305 | /* | 
| paulineoonk | 3:36e706d6b3d2 | 306 | double Encoder () | 
| paulineoonk | 3:36e706d6b3d2 | 307 | { | 
| paulineoonk | 3:36e706d6b3d2 | 308 | double Huidigepositie = motor1.getPosition (); | 
| paulineoonk | 3:36e706d6b3d2 | 309 | return Huidigepositie; // huidige positie = current position | 
| paulineoonk | 3:36e706d6b3d2 | 310 | } | 
| paulineoonk | 6:e0e5da2c068f | 311 | |
| paulineoonk | 3:36e706d6b3d2 | 312 | double FeedBackControl(double error, double &e_prev, double &e_int) // schaalt de snelheid naar de snelheid zodat onze chip het begrijpt (is nog niet in werking) | 
| Miriam | 0:d5fb29bc0847 | 313 | { | 
| paulineoonk | 3:36e706d6b3d2 | 314 | double kp = 0.001; // has jet to be scaled | 
| paulineoonk | 3:36e706d6b3d2 | 315 | double Proportional= kp*error; | 
| Miriam | 0:d5fb29bc0847 | 316 | |
| paulineoonk | 3:36e706d6b3d2 | 317 | double kd = 0.0004; // has jet to be scaled | 
| paulineoonk | 3:36e706d6b3d2 | 318 | double VelocityError = (error - e_prev)/Ts; | 
| paulineoonk | 3:36e706d6b3d2 | 319 | double Derivative = kd*VelocityError; | 
| Miriam | 0:d5fb29bc0847 | 320 | e_prev = error; | 
| Miriam | 0:d5fb29bc0847 | 321 | |
| paulineoonk | 3:36e706d6b3d2 | 322 | double ki = 0.00005; // has jet to be scaled | 
| Miriam | 0:d5fb29bc0847 | 323 | e_int = e_int+Ts*error; | 
| paulineoonk | 3:36e706d6b3d2 | 324 | double Integrator = ki*e_int; | 
| Miriam | 0:d5fb29bc0847 | 325 | |
| Miriam | 0:d5fb29bc0847 | 326 | |
| paulineoonk | 3:36e706d6b3d2 | 327 | double motorValue = Proportional + Integrator + Derivative; | 
| Miriam | 0:d5fb29bc0847 | 328 | return motorValue; | 
| Miriam | 0:d5fb29bc0847 | 329 | } | 
| paulineoonk | 6:e0e5da2c068f | 330 | |
| paulineoonk | 3:36e706d6b3d2 | 331 | void SetMotor1(double motorValue) | 
| Miriam | 0:d5fb29bc0847 | 332 | { | 
| Miriam | 0:d5fb29bc0847 | 333 | if (motorValue >= 0) | 
| Miriam | 0:d5fb29bc0847 | 334 | { | 
| Miriam | 0:d5fb29bc0847 | 335 | M1D = 0; | 
| Miriam | 0:d5fb29bc0847 | 336 | } | 
| Miriam | 0:d5fb29bc0847 | 337 | else | 
| Miriam | 0:d5fb29bc0847 | 338 | { | 
| Miriam | 0:d5fb29bc0847 | 339 | M1D = 1; | 
| Miriam | 0:d5fb29bc0847 | 340 | } | 
| Miriam | 0:d5fb29bc0847 | 341 | |
| Miriam | 0:d5fb29bc0847 | 342 | if (fabs(motorValue) > 1) | 
| Miriam | 0:d5fb29bc0847 | 343 | { | 
| Miriam | 0:d5fb29bc0847 | 344 | M1E = 1; //de snelheid wordt teruggeschaald naar 8.4 rad/s (maximale snelheid, dus waarde 1) | 
| Miriam | 0:d5fb29bc0847 | 345 | } | 
| Miriam | 0:d5fb29bc0847 | 346 | else | 
| Miriam | 0:d5fb29bc0847 | 347 | { | 
| Miriam | 0:d5fb29bc0847 | 348 | M1E = fabs(motorValue); //de absolute snelheid wordt bepaald, de motor staat uit bij een waarde 0 | 
| Miriam | 0:d5fb29bc0847 | 349 | } | 
| Miriam | 0:d5fb29bc0847 | 350 | } | 
| paulineoonk | 7:05c71a859d27 | 351 | */ | 
| paulineoonk | 3:36e706d6b3d2 | 352 | void MeasureAndControl () | 
| Miriam | 0:d5fb29bc0847 | 353 | { | 
| paulineoonk | 3:36e706d6b3d2 | 354 | // hier the control of the control system | 
| paulineoonk | 7:05c71a859d27 | 355 | |
| paulineoonk | 9:285499f48cdd | 356 | if(caldone==false) | 
| paulineoonk | 9:285499f48cdd | 357 | { | 
| paulineoonk | 9:285499f48cdd | 358 | if(button1.read()==false) | 
| paulineoonk | 9:285499f48cdd | 359 | { | 
| paulineoonk | 10:518a8617c86e | 360 | CalibrationEMG(); | 
| paulineoonk | 9:285499f48cdd | 361 | } | 
| paulineoonk | 9:285499f48cdd | 362 | } | 
| paulineoonk | 9:285499f48cdd | 363 | if (caldone==true) | 
| paulineoonk | 7:05c71a859d27 | 364 | |
| paulineoonk | 9:285499f48cdd | 365 | { | 
| paulineoonk | 8:c4ec359af35d | 366 | Filteren(); | 
| paulineoonk | 11:b46a4c48c08f | 367 | changePosition(); | 
| paulineoonk | 7:05c71a859d27 | 368 | //rest | 
| paulineoonk | 9:285499f48cdd | 369 | } | 
| paulineoonk | 7:05c71a859d27 | 370 | |
| paulineoonk | 4:5607088ef6f5 | 371 | //double Huidigepositie = Encoder(); | 
| paulineoonk | 4:5607088ef6f5 | 372 | //double error = (refP - Huidigepositie);// make an error | 
| paulineoonk | 4:5607088ef6f5 | 373 | //double motorValue = FeedBackControl(error, e_prev, e_int); | 
| paulineoonk | 7:05c71a859d27 | 374 | //double motorValue = refP; | 
| paulineoonk | 7:05c71a859d27 | 375 | //SetMotor1(motorValue); | 
| Miriam | 0:d5fb29bc0847 | 376 | } | 
| paulineoonk | 14:a861ba49107c | 377 | void Loop_funtion() | 
| paulineoonk | 14:a861ba49107c | 378 | { | 
| paulineoonk | 14:a861ba49107c | 379 | switch(State){ | 
| paulineoonk | 14:a861ba49107c | 380 | case Cal1: //Calibration motor 1 | 
| paulineoonk | 14:a861ba49107c | 381 | // naar achteren bewegen( als voorbeeld Arvid), daarna deze waarde opslaan als offset. Dan bewegen naar home middels PID en verschil encodervalue uiterste stand en home1. | 
| paulineoonk | 14:a861ba49107c | 382 | motorValue1 = 0.5f; motorValue2=0; | 
| paulineoonk | 14:a861ba49107c | 383 | |
| paulineoonk | 14:a861ba49107c | 384 | |
| paulineoonk | 14:a861ba49107c | 385 | if (Huidigepositie1== 0) | 
| paulineoonk | 14:a861ba49107c | 386 | { | 
| paulineoonk | 14:a861ba49107c | 387 | SetMotor1(value); //value is waarde encoder voor loodrechte hoeken,. | 
| paulineoonk | 14:a861ba49107c | 388 | if (fabs(huidigepositie1-home1)<0.01) { | 
| paulineoonk | 14:a861ba49107c | 389 | state=Cal2 | 
| paulineoonk | 14:a861ba49107c | 390 | } | 
| paulineoonk | 14:a861ba49107c | 391 | } | 
| paulineoonk | 14:a861ba49107c | 392 | else { | 
| paulineoonk | 14:a861ba49107c | 393 | SetMotor1(0); | 
| paulineoonk | 14:a861ba49107c | 394 | Loop_function(); | 
| paulineoonk | 14:a861ba49107c | 395 | } | 
| paulineoonk | 14:a861ba49107c | 396 | break; | 
| paulineoonk | 14:a861ba49107c | 397 | |
| paulineoonk | 14:a861ba49107c | 398 | case Cal2: //Calibration motor 2 | 
| paulineoonk | 14:a861ba49107c | 399 | if (Huidigepositie2== 0) | 
| paulineoonk | 14:a861ba49107c | 400 | { | 
| paulineoonk | 14:a861ba49107c | 401 | if (encoder2.read)<0.01){ | 
| paulineoonk | 14:a861ba49107c | 402 | state=CalEMG; | 
| paulineoonk | 14:a861ba49107c | 403 | } | 
| paulineoonk | 14:a861ba49107c | 404 | else { | 
| paulineoonk | 14:a861ba49107c | 405 | SetMotor2(0); | 
| paulineoonk | 14:a861ba49107c | 406 | Loop_function(); | 
| paulineoonk | 14:a861ba49107c | 407 | } | 
| paulineoonk | 14:a861ba49107c | 408 | break; | 
| paulineoonk | 14:a861ba49107c | 409 | case CalEMG: // Calibration EMG | 
| paulineoonk | 14:a861ba49107c | 410 | calibrationEMG(); //calculates average EMGFiltered at rest and measures max signal EMGFiltered. | 
| paulineoonk | 14:a861ba49107c | 411 | state=SelectDevice; | 
| paulineoonk | 14:a861ba49107c | 412 | break; | 
| paulineoonk | 14:a861ba49107c | 413 | case SelectDevice: //Looks at the difference between current position and home. Select aansturen EMG or buttons | 
| paulineoonk | 14:a861ba49107c | 414 | if button=1; { | 
| paulineoonk | 14:a861ba49107c | 415 | state=EMG; | 
| paulineoonk | 14:a861ba49107c | 416 | } | 
| paulineoonk | 14:a861ba49107c | 417 | if button=0; { | 
| paulineoonk | 14:a861ba49107c | 418 | state=Demo; | 
| paulineoonk | 14:a861ba49107c | 419 | } | 
| paulineoonk | 14:a861ba49107c | 420 | break; | 
| paulineoonk | 14:a861ba49107c | 421 | case EMG: //Aansturen met EMG | 
| paulineoonk | 14:a861ba49107c | 422 | Filteren(); | 
| paulineoonk | 14:a861ba49107c | 423 | changePosition(); | 
| paulineoonk | 14:a861ba49107c | 424 | break; | 
| paulineoonk | 14:a861ba49107c | 425 | case Demo: // Aansturen met toetsenbord | 
| paulineoonk | 14:a861ba49107c | 426 | break; | 
| paulineoonk | 14:a861ba49107c | 427 | } | 
| Miriam | 0:d5fb29bc0847 | 428 | |
| paulineoonk | 8:c4ec359af35d | 429 | void Tickerfunctie() | 
| paulineoonk | 8:c4ec359af35d | 430 | { | 
| paulineoonk | 13:3351f4374885 | 431 | //if(caldone == false) | 
| paulineoonk | 13:3351f4374885 | 432 | //{ | 
| paulineoonk | 12:65b8d29bdd5d | 433 | pc.printf("emgreadRB = %f , emgFiltered = %f, maxi = %f meanrest = %f\r\n",emgRB.read(), RBF, MVCRB, RESTMEANLB); | 
| paulineoonk | 11:b46a4c48c08f | 434 | pc.printf("emgreadLB = %f , emgFiltered = %f, maxi = %f, meanrest = %f emgSUMLB %f ,Timescalibration %i\r\n",emgLB.read(), LBF, MVCLB,RESTMEANRB,emgSUMLB, Timescalibration); | 
| paulineoonk | 10:518a8617c86e | 435 | pc.printf("emgreadRT = %f , emgFilteredRT = %f, maxiRT = %f meanrest = %f \r\n",emgRT.read(), RTF, MVCRT,RESTMEANRT); | 
| paulineoonk | 10:518a8617c86e | 436 | pc.printf("emgreadLT = %f , emgFilteredLT = %f, maxiLT = %f meanrest = %f \r\n",emgLT.read(), LTF, MVCLT,RESTMEANLT); | 
| paulineoonk | 13:3351f4374885 | 437 | //} | 
| paulineoonk | 8:c4ec359af35d | 438 | } | 
| paulineoonk | 7:05c71a859d27 | 439 | |
| Miriam | 0:d5fb29bc0847 | 440 | int main() | 
| Miriam | 0:d5fb29bc0847 | 441 | { | 
| paulineoonk | 7:05c71a859d27 | 442 | //voor EMG filteren | 
| paulineoonk | 10:518a8617c86e | 443 | //Left Bicep | 
| paulineoonk | 9:285499f48cdd | 444 | NFLB.add( &N1LB ); | 
| paulineoonk | 10:518a8617c86e | 445 | HPFLB.add( &HP1LB ).add( &HP2LB ); | 
| paulineoonk | 9:285499f48cdd | 446 | LPFLB.add( &LP1LB ).add( &LP2LB ); | 
| paulineoonk | 9:285499f48cdd | 447 | |
| paulineoonk | 10:518a8617c86e | 448 | //Right Bicep | 
| paulineoonk | 10:518a8617c86e | 449 | NFRB.add( &N1RB ); | 
| paulineoonk | 10:518a8617c86e | 450 | HPFRB.add( &HP1RB ).add( &HP2RB ); | 
| paulineoonk | 10:518a8617c86e | 451 | LPFRB.add( &LP1RB ).add( &LP2RB ); | 
| paulineoonk | 9:285499f48cdd | 452 | |
| paulineoonk | 10:518a8617c86e | 453 | //Left Tricep | 
| paulineoonk | 10:518a8617c86e | 454 | NFLT.add( &N1LT ); | 
| paulineoonk | 10:518a8617c86e | 455 | HPFLT.add( &HP1LT ).add( &HP2LT ); | 
| paulineoonk | 10:518a8617c86e | 456 | LPFLT.add( &LP1LT ).add( &LP2LT ); | 
| paulineoonk | 10:518a8617c86e | 457 | |
| paulineoonk | 10:518a8617c86e | 458 | //Right Tricep | 
| paulineoonk | 10:518a8617c86e | 459 | NFRT.add( &N1RT ); | 
| paulineoonk | 10:518a8617c86e | 460 | HPFRT.add( &HP1RT ).add( &HP2RT ); | 
| paulineoonk | 10:518a8617c86e | 461 | LPFRT.add( &LP1RT ).add( &LP2RT ); | 
| paulineoonk | 3:36e706d6b3d2 | 462 | |
| paulineoonk | 7:05c71a859d27 | 463 | //voor serial | 
| paulineoonk | 7:05c71a859d27 | 464 | pc.baud(115200); | 
| paulineoonk | 7:05c71a859d27 | 465 | |
| paulineoonk | 7:05c71a859d27 | 466 | //motor | 
| paulineoonk | 8:c4ec359af35d | 467 | // M1E.period(PwmPeriod); //set PWMposition at 5000hz | 
| paulineoonk | 7:05c71a859d27 | 468 | //Ticker | 
| paulineoonk | 7:05c71a859d27 | 469 | Treecko.attach(MeasureAndControl, tijdstap); //Elke 1 seconde zorgt de ticker voor het runnen en uitlezen van de verschillende | 
| paulineoonk | 3:36e706d6b3d2 | 470 | //functies en analoge signalen. Veranderingen worden elke 1 seconde doorgevoerd. | 
| paulineoonk | 9:285499f48cdd | 471 | printer.attach(Tickerfunctie,0.4); | 
| paulineoonk | 14:a861ba49107c | 472 | |
| paulineoonk | 14:a861ba49107c | 473 | //State Machine | 
| paulineoonk | 14:a861ba49107c | 474 | State = Cal1; | 
| paulineoonk | 14:a861ba49107c | 475 | Position_controller_on = false; | 
| paulineoonk | 14:a861ba49107c | 476 | Main_loop.attach(&loop_function, looptime); | 
| paulineoonk | 3:36e706d6b3d2 | 477 | while(true) | 
| Miriam | 0:d5fb29bc0847 | 478 | { | 
| paulineoonk | 14:a861ba49107c | 479 | |
| paulineoonk | 3:36e706d6b3d2 | 480 | } | 
| paulineoonk | 3:36e706d6b3d2 | 481 | |
| paulineoonk | 3:36e706d6b3d2 | 482 | |
| paulineoonk | 3:36e706d6b3d2 | 483 | } | 
