Introduction: ROBOTC VEX Light Sensor Car

This car uses only parts from the ROBOTC VEX collection. It is fairly simple and is a good project for beginners learning the ROBOTC Program that can be later developed into something bigger. The project will need the following:

ROBOTC for VEX Robotics programming on computer.

VEX Cortex

Any kind of wheels (We used (2) 2.75 in. wheels and (2) 4 in. wheels)

(2) 2 wire motors (We used 393 Motors)

1 battery

1 Battery Strap

A small test-bed

(2) 3 in. drive shafts

(2) Shaft Collars

(2) Motor Controllers (VEX)

1 Light Sensor (VEX)

Screws 3/4 in.

Nuts 8-32

For this instructable the car should not take much longer than a couple of hours. We made it simple so that it can be modified later as you get more familiar with the VEX components and the ROBOTC Programming.

The materials all used must be from VEX Products and can be bought in packs, or like in our case, be found in school.

Step 1: Downloading and Setting Up VEX Robotics

1. First download the program into a compatible computer. Make sure it is downloaded as VEX IQ.

2. Open the program and set up the program with these details.

File-

Open a new file a select PLTW template

Robot-

Go to VEX Cortex Communication Mode. Select VEXnet or USB.

Go to Platform Type. Select VEX 2.0 Cortex and Natural Language PLTW

Window- Go to Menu Level. Select the Expert Option

Go to Motors and Sensors Set Up. Select the motors tab and set the left and right motors to the ports as shown in the picture. Select the VEX 2.0 Analog Sensors 1-8 tab and set the light sensor to the port as shown in the picture.

Apply this and exit out of the box.

Step 2: Building the Car

1. Grab all essential materials.

2. Take the test-bed of the car and put the drive shafts into the last holes of the side.

3. Attach the wheels and put drive shafts into the ends.

Step 3: Adding VEX Components

1. Choose a place for the cortex platform to fit (preferably in the middle)

2. Screw this into place, using shafts and shaft collars, and make sure it is secure so it will not fall around.

3. Put the battery collar next to the cortex.

4. Plug in the battery and secure it.

5. Grab the light sensor and attach it to the other side of the cortex. Secure it into place with the screws.

6. Attach the motors onto the wheel and its shaft. Make sure it is snug but not too tight so they can move around.

7. Connect the motors to the motor controllers.

8. Connect the motor wires and light sensor wire to the corresponding ports as shown in the photo.

Step 4: Making the Code

1. Type in the following code as shown in the photo attached.

2. Download and Compile the Program onto the Robot

Note: The battery must be plugged in and charged. The cortex should also be connected to the computer when downloaded using the USB cable.

Step 5: Testing Out the Car

When the program is downloaded and started the motors should move if the light sensor value is greater than 50. If you move into a different room that changes this value it will either keep moving or stop. When the car is in the dark it should turn off.

With the small project you can now develop it into something better. You might have some problems trouble shooting the code or if certain materials aren't working. The downfall of this car is that is must be plugged into a computer as it moves around. It can be modified using other products/components of the VEX collection. We hoped you enjoyed this car and now understand how coding works at least a little.