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: Dynamixel Protocol Utilities mbed
Fork of Nucleo_Dynamixel_18V by
main.cpp
- Committer:
- daemonslayer
- Date:
- 2016-07-04
- Revision:
- 0:9e2ed7d4d2ea
- Child:
- 1:bae7d30014b7
File content as of revision 0:9e2ed7d4d2ea:
#include "mbed.h"
#include "Dynamixel.h"
Serial pc(USBTX,USBRX);
int main()
{
uint8_t delayTest;
uint16_t modelNumber;
uint16_t id;
Dynamixel DX116(PA_9, PA_10, PB_3, 1, 57600);
pc.baud(9600);
DX116.toggleLED(1);
wait(1);
DX116.toggleLED(0);
wait(1);
DX116.move(0);
wait(1);
DX116.move(4095);
wait(1);
delayTest = DX116.getReturnDelayTime();
pc.printf("Delay Time: 0x%04x\r\n",delayTest);
wait(1);
modelNumber = DX116.getModelNumber();
pc.printf("Model Number: 0x%04x\r\n",modelNumber);
wait(1);
id = DX116.getId();
pc.printf("ID Number: 0x%04x\r\n",id);
}
