Difference between revisions of "Tutorials/Arduino Projects/Mobile Robotics/VEX/Connecting a Light Sensor"

From ROBOTC API Guide
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:Connecting a Light Sensor}} <yambe:breadcrumb self="Connecting a Light Sensor">Tutorials/Arduino_Projects/Mobile_Robotics/VEX|VEX + Arduino, Mobile Robotics Pla...")
 
Line 2: Line 2:
 
<yambe:breadcrumb self="Connecting a Light Sensor">Tutorials/Arduino_Projects/Mobile_Robotics/VEX|VEX + Arduino, Mobile Robotics Platform</yambe:breadcrumb>
 
<yambe:breadcrumb self="Connecting a Light Sensor">Tutorials/Arduino_Projects/Mobile_Robotics/VEX|VEX + Arduino, Mobile Robotics Platform</yambe:breadcrumb>
 
{{tl|1}}
 
{{tl|1}}
 +
 +
==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.
 +
 +
{|align="center"
 +
|-
 +
| [[image:VEX_light_sensor_remove_ultrasonic.png|thumb|c|center|300px|Take off the ultrasonic sensor.]]
 +
|| [[image:BoeBot_light_sensor_attach.png|thumb|c|center|300px|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'''.
 +
 +
[[image:VEX_light_sensor_schematic.png|thumb|c|center|300px|A schematic of the wiring.]]
 +
 +
{|align="center"
 +
|-
 +
| [[image:VEX_light_sensor_virtual_breadboard.png|thumb|c|center|400px|Virtual breadboard view.]] || [[image:VEX_Light_Sensor_wiring.jpg|thumb|c|center|400px|A view of the wiring.]]
 +
|}

Revision as of 13:42, 25 July 2012

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.