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.
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.