Sensor Setup

Your main board has a number of ports on it and sensors can be connected to almost all of these ports.

We need to map the port number to the actual sensor that is connected to it.

Looking at the code in the file https://github.com/BotBuildersRobotics/BrushlessSumo/blob/main/BrushlessSumo.cpp

We can see statements such as:


boolean BrushlessSumo::IsOnFrontLeftLight()
{
  return analogRead(AC4) > 50; 
}

boolean BrushlessSumo::IsFarLeftDist()
{
  return !digitalRead(DC12); 
}

Notice how the port number is in captial letters. These port numbers should be changed to match the setting that you have plugged your board into.

Remember, the light sensors can only be plugged into a port that is marked as AC as they require an Analog input.

Last updated