RE:Pretty stupid question probably, newbie

you use a while loop then put a bumper, and setting while (1)

you set bumper (bumper) int

you set if-then (bumper == 1)

you set the controlls on if

you set then (as the atonomous mode)

when the bumper hits the wall the robot will automatically go into atonamous mode, then after the motor programming, it will automatically go out of atonomous mode;)

Note: atonomous mode is automatic!!

This is the c-code


#include “userapi.h”

int bumper;

void main (void)
{
bumper = GetDigitalInput (1);
if (bumper == 1)
{
Arcade2 (0,1,2,1,2,0,0);
}
Else
{
SetMotor (1,0);
SetMotor (2,255);
wait (1000);
SetMotor (1,127);
SetMotor (2,127); // Right after, the program goes to remote controller
}
}
}