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
Diff: main.cpp
- Revision:
- 0:9e2ed7d4d2ea
- Child:
- 1:bae7d30014b7
diff -r 000000000000 -r 9e2ed7d4d2ea main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon Jul 04 06:09:33 2016 +0000
@@ -0,0 +1,30 @@
+#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);
+
+}
\ No newline at end of file
