/*tameshi-9-2*/
#define THRESHOLD 40
#define RUN_TIME 100
 
task main()
{
ClearTimer(0);
SetSensor(SENSOR_1,SENSOR_LIGHT);
while ( Timer(0) <= RUN_TIME )
{
if(SENSOR_1<=THRESHOLD)
{OnFwd(OUT_A+OUT_C);
}
else
{
OnRev(OUT_A+OUT_C);
Wait(30);
OnFwd(OUT_A);
if(SENSOR_1<=THRESHOLD)
{
OnFwd(OUT_A+OUT_C);
}
else
{
OnRev(OUT_A);
Wait(30);
OnFwd(OUT_C);
}
}}}

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