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.
Fork of f3rc2 by
Revision 2:1a2984dfac3e, committed 2016-08-30
- 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 |
--- 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); }