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.
Diff: DOU.h
- Revision:
- 9:215d94939bc9
diff -r 3eb58ae94a93 -r 215d94939bc9 DOU.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/DOU.h Thu Jan 30 05:24:48 2014 +0000
@@ -0,0 +1,66 @@
+
+ void DOU1(void const *argument) {
+ Dou1.period(0.0001);
+ Dou1.pulsewidth(0.00005f);
+ while(true){
+ if(dou1==1){
+ switch(deg1){
+ case 1:
+ Dou1.pulsewidth(0.00010f); //iki
+ if(pote1>0.7f)deg1=2;
+ break;
+
+ case 2:
+ Dou1.pulsewidth(0.00005f); //stop
+ deg1=3;
+ break;
+
+ case 3:
+ Dou1.pulsewidth(0.00000f); //kaeri
+ if(pote1<0.3f)deg1=4;
+ break;
+
+ case 4:
+ Dou1.pulsewidth(0.00005f); //stop
+ deg1=1;
+ dou1=0;
+ break;
+ }
+ }
+ }
+}
+
+
+ void DOU2(void const *argument) {
+ Dou2.period(0.0001);
+ Dou2.pulsewidth(0.00005f);
+ while(true){
+ if(dou2==1){
+ switch(deg2){
+ case 1:
+ Dou2.pulsewidth(0.00010f); //iki
+ if(pote2>0.566f)deg2=2;
+ break;
+
+ case 2:
+ Dou2.pulsewidth(0.00005f); //stop
+ deg2=3;
+ break;
+
+ case 3:
+ Dou2.pulsewidth(0.00000f); //kaeri
+ if(pote2<0.53f)deg2=4;
+ break;
+
+ case 4:
+ Dou2.pulsewidth(0.00005f); //stop
+ deg2=1;
+ dou2=0;
+ break;
+ }
+ }
+ }
+}
+
+
+
\ No newline at end of file