demo project
Dependencies: AX-12A Dynamixel mbed iothub_client EthernetInterface NTPClient ConfigFile SDFileSystem iothub_amqp_transport mbed-rtos proton-c-mbed wolfSSL
Diff: RobotArm.cpp
- Revision:
- 11:3a2e6eb9fbb8
- Parent:
- 10:9b21566a5ddb
- Child:
- 12:ac6c9d7f8c40
--- a/RobotArm.cpp Wed Jan 06 00:58:41 2016 +0000 +++ b/RobotArm.cpp Wed Jan 06 22:25:51 2016 +0000 @@ -9,7 +9,7 @@ using namespace std; -DynamixelBus dynbus( PTC17, PTC16, D7, D6, 1000000 ); +DynamixelBus dynbus( PTC17, PTC16, D7, D6, 500000 ); // set the id for each part in the chain, in order @@ -36,6 +36,13 @@ failms = 0; } +void RobotArm::ClearErrorState() +{ + for (int i = 0; i < _numParts; i++) + { + _armParts[i]->DoAction(NA_ClearError, 0.0f); + } +} // move all parts to specified postions in ms time bool RobotArm::MoveArmPositionsStart(vector<float> positions, int totms)