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.
Dependents: PSL_ROBOT_lorenzo robot_lorenzo recepteur_mbed_os_6
Diff: MX12.cpp
- Revision:
- 27:06850c65b9c8
- Parent:
- 26:4632a02a8ef1
- Child:
- 28:c7402e1014b4
--- a/MX12.cpp Fri Nov 26 07:16:53 2021 +0000 +++ b/MX12.cpp Fri Nov 26 08:55:31 2021 +0000 @@ -406,10 +406,25 @@ printf("%d %d %dn\r",(int)(1000*W1),(int)(1000*W2),(int)(1000*W3)); - SetSpeed(1,W1); // impose la vitesse au moteur 1 - SetSpeed(2,W2); - SetSpeed(3,W3); + SetSpeed_rad_s(1,W1); // impose la vitesse au moteur 1 + SetSpeed_rad_s(2,W2); + SetSpeed_rad_s(3,W3); + + } + +void MX12::eteindre_moteurs(){ + char data[1]; + + data[0] = 0; + - } + // Send instruction + _bus_state = SerialState::Writing; + rw(1, CONTROL_TABLE_TORQUE_ENABLE , 1, data); + _bus_state = SerialState::Writing; + rw(2, CONTROL_TABLE_TORQUE_ENABLE , 1, data); + _bus_state = SerialState::Writing; + rw(3, CONTROL_TABLE_TORQUE_ENABLE , 1, data); +}