test

Dependencies:   AX12 mbed

Files at this revision

API Documentation at this revision

Comitter:
hirarin
Date:
Sun May 03 11:55:52 2015 +0000
Commit message:
test; ; hirano

Changed in this revision

AX12.lib Show annotated file Show diff for this revision Revisions of this file
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 3707b95b0127 AX12.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AX12.lib	Sun May 03 11:55:52 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/chris/code/AX12/#ced71d1b2558
diff -r 000000000000 -r 3707b95b0127 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun May 03 11:55:52 2015 +0000
@@ -0,0 +1,37 @@
+#include "mbed.h"
+#include "AX12.h"
+ 
+int main() {
+    
+    
+    AX12 myax12 (p9, p10, 1); // AX12(txPin rxPin id)
+    myax12.SetMode(1);///position servo: 0, speed servo:1
+    //Sample Program
+    /*while (1) {
+        myax12.SetGoal(0);    // go to 0 degrees
+        wait (2.0);
+        myax12.SetGoal(300);  // go to 300 degrees
+        wait (2.0);
+    }
+    
+    */
+    
+    LocalFileSystem local("local");
+      
+    
+    //FILE *fp;
+    int i=0;
+    
+    while (1) {
+        
+        myax12.SetCRSpeed(0.5);
+        //float ang = myax12.GetPosition();
+        
+        //fp = fopen("/local/out.txt", "a");  // ファイルを書き込みモードで開く
+        //fprintf(fp, "\n %f",ang);
+        //fclose(fp);
+        i++;        
+    } 
+     
+    // */   
+}
diff -r 000000000000 -r 3707b95b0127 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun May 03 11:55:52 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912
\ No newline at end of file