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: mbed bloc_8_pompe2 Herkulex_library_2022 ident_crac1 bloc_pompe2
Diff: Gestion_Torque/torque.cpp
- Revision:
- 2:c7f2e7d8b305
- Child:
- 3:77e937c315f1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Gestion_Torque/torque.cpp Tue Mar 08 16:03:27 2022 +0000
@@ -0,0 +1,25 @@
+#include "torque.h"
+
+void activer_torque(void) //Active le couple sur tous les servomoteurs
+{
+ for(int i=1;i<=6;i++)
+ {
+ setTorque(i,TORQUE_ON,1);
+ setTorque(i,TORQUE_ON,2);
+ setTorque(i,TORQUE_ON,3);
+ setTorque(i,TORQUE_ON,4);
+ setTorque(i,TORQUE_ON,5);
+ }
+}
+
+void desactiver_torque(void) //Désactive le couple sur tous les servomoteurs
+{
+ for(int i=1;i<=6;i++)
+ {
+ setTorque(i,TORQUE_FREE,1);
+ setTorque(i,TORQUE_FREE,2);
+ setTorque(i,TORQUE_FREE,3);
+ setTorque(i,TORQUE_FREE,4);
+ setTorque(i,TORQUE_FREE,5);
+ }
+}