2006a/A5/54練習
2006a/A5
プログラム†
書道ロボット『木』の初期プログラム†
task main()
{
OnFwd(OUT_A);OnFwd(OUT_C);
Wait(150);
OnRev(OUT_A);OnRev(OUT_C);
Wait(300);
OnFwd(OUT_A);OnFwd(OUT_C);
Wait(150);
OnFwd(OUT_A);OnRev(OUT_C);
Wait(100);
OnFwd(OUT_A);OnFwd(OUT_C);
Wait(100);
OnRev(OUT_A);OnRev(OUT_C);
Wait(300);
OnFwd(OUT_A);OnFwd(OUT_C);
Wait(200);
OnRev(OUT_A);OnFwd(OUT_C);
Wait(150);
OnFwd(OUT_A);OnFwd(OUT_C);
Wait(200);
OnRev(OUT_A);OnRev(OUT_C);
Wait(200);
OnRev(OUT_A);OnFwd(OUT_C);
Wait(100);
OnFwd(OUT_A);OnFwd(OUT_C);
Wait(200);
}
タッチセンサーの初期プログラム†
task main()
{
SetSensor(SENSOR_1,SENSOR_TOUCH);
OnFwd(OUT_A+OUT_C);
until(SENSOR_1==1);
Off(OUT_A+OUT_C);
Wait(100);
OnRev(OUT_A+OUT_C);
Wait(75);
OnFwd(OUT_A);Rev(OUT_C);
Wait(200);
OnFwd(OUT_A+OUT_C);
Wait(200);
Off(OUT_A+OUT_C);
}