electro
Dependencies: mbed QEI mbed-os KeypadLib TextLCD
Revision 9:1683e8d3454f, committed 2019-03-10
- Comitter:
- afsaavedram
- Date:
- Sun Mar 10 19:38:12 2019 +0000
- Parent:
- 8:3649a359ee91
- Child:
- 10:5a327d0a2a5f
- Commit message:
- v_final
Changed in this revision
| electrocoagulador_final.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/electrocoagulador_final.cpp Sat Mar 09 17:20:18 2019 +0000
+++ b/electrocoagulador_final.cpp Sun Mar 10 19:38:12 2019 +0000
@@ -21,10 +21,10 @@
/*******************VARIABLES********************/
int tempUser1 = 1; // Tiempo tope de electrocoagulacion
int tempUser2 = 1; // Tiempo tope de reposo de la vinaza
-int tempUser3 = 1; // Tiempo tope de vaciado del agua en el tanque 2
-int tempUser4 = 1; // Tiempo tope de vaciado de residuos en el tanque 2
+int tempUser3 = 20; // Tiempo tope de vaciado del agua en el tanque 2
+int tempUser4 = 10; // Tiempo tope de vaciado de residuos en el tanque 2
int pwm = 50.0f; // Duty cycle del motor
-int tiempoLlenado = 5; // Tiempo de llenado del tanque 1
+int tiempoLlenado = 20; // Tiempo de llenado del tanque 1
int a = 0;
int b = 0;
@@ -163,16 +163,16 @@
switch(campo) {
case 1:
- tempUser1 = 60*(a+b+c);
+ tempUser1 = a+b+c;
break;
case 2:
- tempUser2 = timeScale*(a+b+c);
+ tempUser2 = a+b+c;
break;
case 3:
- tempUser3 = timeScale*(a+b+c);
+ tempUser3 = a+b+c;
break;
case 4:
- tempUser4 = timeScale*(a+b+c);
+ tempUser4 = a+b+c;
break;
case 5:
pwm=a+b+c;
@@ -210,7 +210,7 @@
void vaciado1()
{
E_2 = 0;
- t.attach(&reposo, tempUser2);
+ t.attach(&reposo, timeScale*tempUser2);
motor_plus.write(0.0f);
}
@@ -226,7 +226,7 @@
{
E_1 = 0;
//motor_plus.write( pwm/100);
- t.attach(&electro, tempUser1);
+ t.attach(&electro, timeScale*tempUser1);
y = encoder.getSumangle();
@@ -248,7 +248,7 @@
int main()
{
-
+ wait(2);
motor_plus.period(0.015f);
motor_cero.write(0.0f);