aaa

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
igarashi50
Date:
Sun May 20 15:57:06 2018 +0000
Commit message:
aaa

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun May 20 15:57:06 2018 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+
+#define MOTOR_ADDRESS 0xC8
+
+Serial pc(USBTX,USBRX);
+I2C motor(p28, p27);
+char cmd[3];
+
+int main()
+{
+    pc.printf("start\r\n");
+    motor.frequency(100000);
+    cmd[0] = 0xC8;
+    cmd[1] = 0x00;
+    cmd[2] = 0x49;
+    motor.write(MOTOR_ADDRESS,cmd,3);
+    pc.printf("end\r\n");
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun May 20 15:57:06 2018 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/mbed_official/code/mbed/builds/a97add6d7e64
\ No newline at end of file