2004/A6/練習問題

taskmain()

{

SetSensor(SENSOR_1,SENSOR_LIGHT);

max = SENSOR_1;

CrearTimer(0);

time = Timer(0);

while(Timer(0) <= 75)

{

OnRev(OUT_A);

if(SENSOR_1 > max)

{

ClearTimer(1);

max = SENSOR_1;

}

else

{

max = max;

time =Timer(1);

}

}

ClearTimer(1);

while(Timer(1) <= 75 - time)

{

OnRev(OUT_A);

}

OnFwd(OUT_A);

}


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2005-03-01 (火) 15:35:18