書道ロボット
#define arm_12 RotateMotorEx(OUT_BC,50,-100,8,true,true) #define penDW RotateMotor(OUT_A,50,90); #define penUP RotateMotor(OUT_A,50,-86); #define re ResetTachoCount(OUT_BC); task main() { RotateMotor(OUT_C,30,85); RotateMotor(OUT_A,30,60); Wait(500); penDW; //点1 penUP; RotateMotor(OUT_C,30,-18); RotateMotor(OUT_B,30,-15); Wait(500); penDW; //点2 penUP; Wait(500); RotateMotor(OUT_C,30,-18); RotateMotor(OUT_B,30,-15); Wait(500); penDW; //横1 RotateMotorEx(OUT_BC,30,40,1true,true); Wait(500); penUP; Wait(500); Off(OUT_A); RotateMotor(OUT_C,30,-18); RotateMotor(OUT_B,30,-20); penDW; //縦1 RotateMotor(OUT_C,30,-25); Wait(500); penUP; Wait(500); Off(OUT_A); RotateMotor(OUT_C,30,-10); RotateMotor(OUT_B,30,-20); Wait(500); penDW; Wait(500); RotateMotor(OUT_B,30,7); Off(OUT_B); RotateMotorEx(OUT_BC,30,40,10,true,true); Off(OUT_BC); RotateMotor(OUT_B,30,-7); penUP; Wait(500); Off(OUT_A); RotateMotor(OUT_C,30,10); RotateMotor(OUT_B,30,20); penDW; //口1 RotateMotor(OUT_C,60,33); Off(OUT_A); Wait(500); RotateMotorEx(OUT_BC,30,-60,10,true,true); Off(OUT_BC) RotateMotor(OUT_C,30,-50); Wait(500); penUP; Wait(500); RotateMotor(OUT_C,30,27); RotateMotor(OUT_B,30,27); penDW; //田1 RotateMotor(OUT_B,40,30); penUP; Off(OUT_A); RotateMotor(OUT_B,30,28); RotateMotor(OUT_C,30,30); penDW //口 RotateMotor(OUT_B,30,-33); Wait(500); Off(OUT_A); RotateMotorEx(OUT_BC,30,-60,-5,true,true); Off(OUT_BC); RotateMotor(OUT_B,50,27); Wait(500); RotateMotorEx(OUT_BC,30,60,12,true,true); Wait(500); penUP; Wait(500); RotateMotor(OUT_B,30,-5); Wait(500); penDW; Wait(500); Off(OUT_A); RotateMotorEx(OUT_BC,30,-50,-5,true,true); Off(OUT_BC); Wait(500); penUP; Off(OUT_A); }