[[2005/C4]]

int penstat=0;
task main()
{
	penon();
	OnRev(OUT_A+OUT_B);
	Wait(300);
	penoff();
	Off(OUT_A);
	Wait(10);
	OnFwd(OUT_A+OUT_B);
	Wait(10);
	Off(OUT_A);
	Wait(10);
	penon();
	OnFwd(OUT_A);
	Wait(300);
	penoff();
	OnRev(OUT_A+OUT_B);
	Wait(100);
	Off(OUT_A+OUT_B);
	OnFwd(OUT_A);
	penon();
	OnFwd(OUT_B);
	Wait(100);
	penoff();
	OnRev(OUT_A+OUT_B);
	Wait(50);
	Off(OUT_A);
	Wait(80);
	penon();
	OnFwd(OUT_B);
	Wait(50);
	penoff();
	OnRev(OUT_B);
	Wait(80);
	OnRev(OUT_A);
	Wait(80);
	penon();
	OnFwd(OUT_A);
	Wait(100);
	penoff();
	Off(OUT_A+OUT_B);
}
sub penon(){
        if(penstat!=1){
                //Write
                SetPower(OUT_C,3);
                OnFwd(OUT_C);
                Wait(20);
                Float(OUT_C);
                penstat=1;
                Wait(50);
        }
}

sub penoff(){
        if(penstat!=0){
                //Dont Write
                SetPower(OUT_C,4);
                OnRev(OUT_C);
                Wait(10);
                Float(OUT_C);
                penstat=0;
                Wait(50);
        }
}


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS