Connecting a Light Sensor

Jump to: navigation, search

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.

File:VEX light sensor remove ultrasonic.png
Take off the ultrasonic sensor.
File:BoeBot light sensor attach.png
Attach the light sensors as close together as possible.

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.

A schematic of the wiring.
Virtual breadboard view.
A view of the wiring.