Connecting a Light Sensor
Physically attaching the sensors
We are going to connect two VEX light sensors to the robot, as two happens to be much more useful than one in terms of navigation, but we'll get to that later. First, we will attach them physically. The regular Swervebot model does not use light sensors, so we will have to improvise. Luckily, the platform we added when attaching the ultrasonic sensor is a perfect position to mount our sensors.
We will also be mounting a touch sensor, to be used later for calibration - something we will go into later. It really doesn't matter where you put this. We mounted it on the same platform by the light sensors.
Wiring up the sensors
The wiring for the sensors is nothing new - in fact, you will be able to recycle much of it from the ultrasonic sensor section. The only thing of note is that we are attaching to analog ports, instead of digital. The left sensor should attach to analog port 0 and the right sensor should attach to analog port 1. We are also adding the wiring for the bump switch, which should attach to digital port 2.