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
diff -r 000000000000 -r 1851b5122ec9 main.cpp
--- /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");
+}
diff -r 000000000000 -r 1851b5122ec9 mbed.bld
--- /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