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.
Dependencies: mbed
Fork of circle_war_ver_A_NUCLEO_ by
Diff: function.h
- Revision:
- 14:3403ce49a37a
- Parent:
- 12:2450012ce888
--- a/function.h Mon Apr 04 09:26:26 2016 +0000 +++ b/function.h Tue Apr 05 17:25:09 2016 +0000 @@ -1,5 +1,10 @@ // pid,valve,interrupt,setupを定義 - +//上下機構&アーム +InterruptIn a(PC_8); +InterruptIn b(PC_6); +PwmOut bole_f(PB_4); +PwmOut bole_b(PB_5); +DigitalOut valve1(PB_7); //PID void pid(float t,int count,double rate,bool c){ target=t; @@ -34,7 +39,7 @@ bole_b=-pwm; } }else{ //桜 - if(pwm>=0){ +/* if(pwm>=0){ bloss_f=pwm; bloss_b=0; }else{ @@ -42,9 +47,10 @@ bloss_b=-pwm; } } +*/ } - +} //valve void valve(bool c){ valve1=c; @@ -90,6 +96,7 @@ //interrupt-blos +/* void risea2() { pa2=1; @@ -134,7 +141,7 @@ count2--; } } - +*/ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -150,19 +157,19 @@ b.rise(&riseb); //B interrupt b.fall(&fallb); //B interrupt - a2.rise(&risea2); //A2 interrupt +/* a2.rise(&risea2); //A2 interrupt a2.fall(&falla2); //A2 interrupt b2.rise(&riseb2); //B2 interrupt b2.fall(&fallb2); //B2 interrupt - +*/ count=0; - count2=0; - +/* count2=0; +*/ //set-motor.period bole_f.period_us(50); bole_b.period_us(50); - bloss_f.period_us(50); +/* bloss_f.period_us(50); bloss_b.period_us(50); catch1_f.period_us(50); catch1_b.period_us(50); @@ -172,6 +179,6 @@ //touchsensor-pullup sw1.mode(PullUp); sw2.mode(PullUp); - +*/ }