fdlsj

Dependencies:   mbed

Fork of f3rc2 by 涼太郎 中村

Files at this revision

API Documentation at this revision

Comitter:
sakanakuuun
Date:
Tue Aug 30 07:05:09 2016 +0000
Parent:
1:a1e592eca305
Commit message:
fe;

Changed in this revision

prime.h Show annotated file Show diff for this revision Revisions of this file
diff -r a1e592eca305 -r 1a2984dfac3e prime.h
--- a/prime.h	Tue Aug 30 06:51:41 2016 +0000
+++ b/prime.h	Tue Aug 30 07:05:09 2016 +0000
@@ -1,4 +1,7 @@
 #include "QEI.h"
+
+#define PERIOD (20 * 1000) //(us)
+
 /*
 primeではPINを制御する関数を扱う。
 
@@ -65,7 +68,7 @@
         degree=175;
 
         i=500+degree*1900/180;
-        pwmhand.pulsewidth_us(i); 
+        pwmhand.write(i/PERIOD); 
         
         
 }
@@ -79,7 +82,7 @@
         degree=160;
 
         i=500+degree*1900/180;
-        pwmarm.pulsewidth_us(i); 
+        pwmarm.write(i/PERIOD); 
         
         
 }
@@ -95,7 +98,7 @@
         degree=90;
 
         i=500+degree*1900/180;
-        mypwm.pulsewidth_us(i); 
+        mypwm.write(i/PERIOD); 
         
         
 }
@@ -111,7 +114,7 @@
         degree=10;
 
         i=500+degree*1900/180;
-        pwmarm.pulsewidth_us(i); 
+        pwmarm.write(i/PERIOD); 
         
         
 }