Here is my code.
Taskmain()
{
if(SensorValue[bump]==1)
{
motor[test] = 127;
}
else
{
motor[test] = 0;
}
}
}
What have I done wrong?
Here is my code.
Taskmain()
{
if(SensorValue[bump]==1)
{
motor[test] = 127;
}
else
{
motor[test] = 0;
}
}
}
What have I done wrong?
It doesn’t look like you have it in a while loop. You want to keep on checking the state of the bump. The way you have it now, the code will check for the state of the bumper once, and if it isn’t pressed, will set the motor to zero and be done.
Thanks for the help!