1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
#define L_MOTOR 2
#define R_MOTOR 0
#define U_MOTOR 1
#define TOPHAT analog(2)
int main()
{
printf(" motor up!\n");
motor(U_MOTOR,-75);
mav(L_MOTOR, 1000);
mav(R_MOTOR, 1000);
sleep(18.0);
printf("done\n");
ao();
if(TOPHAT > 150){
tone(1000.0,3.0);
printf("drop umbrellae\n");
motor(U_MOTOR, 50);
sleep(1.0);
ao();
}
else printf("oSHI ain't got all dem umbrellae\n");
printf("done\n");
return 0;
}
|