From ca1ebc1e70ea545d3733c3601bbdf020a6717c13 Mon Sep 17 00:00:00 2001 From: Neftali Venancio <42760809+NeftaliVenancio@users.noreply.github.com> Date: Tue, 9 Apr 2024 12:22:22 -0700 Subject: [PATCH] Update motor.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrección de código Arduino para el movimiento de reversa de los motores DC convencionales --- www/blocs&generateurs/motor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/blocs&generateurs/motor.js b/www/blocs&generateurs/motor.js index cfc9170d..ab3a5a04 100644 --- a/www/blocs&generateurs/motor.js +++ b/www/blocs&generateurs/motor.js @@ -66,7 +66,7 @@ Blockly.Arduino["moteur_dc"]=function(block){ var code= "digitalWrite(l298n_in1,LOW);\ndigitalWrite(l298n_in2,HIGH);\nanalogWrite(l298n_ena,("+value_vitesse+"));\ndigitalWrite(l298n_in3,LOW);\ndigitalWrite(l298n_in4,HIGH);\nanalogWrite(l298n_enb,("+value_vitesse+"));\n" } else if (dropdown_etat=="0"){ - var code= "digitalWrite(l298n_in1,HIGH);\ndigitalWrite(l298n_in2,LOW);\nanalogWrite(l298n_ena,("+value_vitesse+"));\ndigitalWrite(l298n_in3,HIGH);\ndigitalWrite(l298n_in4,HIGH);\nanalogWrite(l298n_enb,("+value_vitesse+"));\n" + var code= "digitalWrite(l298n_in1,HIGH);\ndigitalWrite(l298n_in2,LOW);\nanalogWrite(l298n_ena,("+value_vitesse+"));\ndigitalWrite(l298n_in3,HIGH);\ndigitalWrite(l298n_in4,LOW);\nanalogWrite(l298n_enb,("+value_vitesse+"));\n" } } if (dropdown_moteur=="6") {