VEX CMUCam robot

This robot uses the same camera that is supplied in the KOP for FRC. also, i added a dual ulltrasonic sensor program, and a line follower program. i used EasyC Pro, and here is a link to the

(https://vexforum.com/local_links.php?action=jump&id=51&catid=26).  mechanically, this robot has a three-jointed arm and a simple claw on the end to pick stuff up.

additional pictures:

http://i37.photobucket.com/albums/e82/pacoliketaco/DSCN3257.jpg

[![](http://i37.photobucket.com/albums/e82/pacoliketaco/DSCN3256.jpg)](http://i37.photobucket.com/albums/e82/pacoliketaco/DSCN3256.jpg)

[![](http://i37.photobucket.com/albums/e82/pacoliketaco/DSCN3254.jpg)](http://i37.photobucket.com/albums/e82/pacoliketaco/DSCN3254.jpg)

[![](http://i37.photobucket.com/albums/e82/pacoliketaco/DSCN3253.jpg)](http://i37.photobucket.com/albums/e82/pacoliketaco/DSCN3253.jpg)

[![](http://i37.photobucket.com/albums/e82/pacoliketaco/DSCN3251.jpg)](http://i37.photobucket.com/albums/e82/pacoliketaco/DSCN3251.jpg)

[![](http://i37.photobucket.com/albums/e82/pacoliketaco/DSCN3252.jpg)](http://i37.photobucket.com/albums/e82/pacoliketaco/DSCN3252.jpg)
in this picture you can see how i was able to change between user-control mode and autonomous with the switch labeled 1|0, and then once the robot is in autonomous mode, it switches between the three using the limit switches.

video of the ultrasonic program running:

[http://s37.photobucket.com/albums/e82/pacoliketaco/?action=view&current=f9241081.flv](http://s37.photobucket.com/albums/e82/pacoliketaco/?action=view&current=f9241081.flv)

video of the camera tracking a green light box i recently made:

[http://s37.photobucket.com/albums/e82/pacoliketaco/?action=view&current=5a0e3514.flv](http://s37.photobucket.com/albums/e82/pacoliketaco/?action=view&current=5a0e3514.flv)

is the red lights on the robot for sight at night or just so the line follower can see the light green better

I noticed that if you moved the Target Light away from the Vex, the Vex would move closer…

If you move the Target closer to the Vex, will the Vex Move back???

Very nice Tracking of the Target Light!!! That is the kind of Coding that is need to have a FRC robot place the Keeper on the Rack in Autonomous Mode!!!

AMAZING!!! great job.but yeah whats the orange lights for… i assume it’s for looks. i’ve been wrong before.

It looks to me like the tracking isn’t sensitive enough. When I programmed our demo bot with a cmucam and a rubber band gun, I had to make sure the robot made it to the necessary position to hit the target. Unfortunately, I can’t see the code (not on my PC, at least). There are probably several ways to make it follow better. Could you post your code in the code tags?

PS. Very cool robot :slight_smile: (and nice cold-cathodes :slight_smile: )

Instead of using a camera, could you just use a light sensor with a color filter? I’m not really sure though, because I don’t have too much experience in programming. The most i’ve ever done was bumper sensors to make the robot back up and turn .

You can’t download the ZIP File “camp_bot.zip”???

https://vexforum.com/local_links.php?action=jump&id=51&catid=26

The CMUCam2 probably has as much processing power as the Vex Controller…

Set the 2007 CMUCam2 Engineering Workbook Documentation.

umm, no i dont think it would be possible to use a light sensor. :frowning: it just wouldnt be accurate, the camera “sees” the green light by taking a picture of what it sees and according to what colors you set it to track, it makes everything of that color highlighted, picks the largest, and tracks it.
the red cathodes are just for looks :slight_smile:
if anyone isnt able to download the code or wants a wiring diagram, if you give me your email address ill send it to you, but you will need EAsyC Pro.

okay, it took awhile to get all of these screenshots, but here is the entire 279 lines of code:
(sorry about the changes in size)

Main:

CamTrack:

UserControl:

UltraSonic:

Linefollower (i didnt test this as much so it may not work)

GetAutoMode:

What I meant was that I had easycPro installed and licensed on my computer and then switched it to a club laptop. I can no longer view easycpro projects on my PC :frowning:

It looks like the robot drives proportionally on the x-axis (horizontally) but can only drive forward on the y-axis (forward/backward).
You can look at the code I used here. Hope this helps!

how many sensors?

whats the thingy that says “oil”

I believe it is a switch labeled “1!0” as in 1 or 0

yeah it is, i got it from a broken desk lamp and thought to use it with vex. its just more handy because it will hold a position unlike the other switches.

How did you wire it (the lamp switch), and what exactly is it used for? It is simple an open/closed toggle switch, right?

exactly, just on/off (1 or 0). i wired it like the bumper switch, using the white and black wires. on the two leads coming out of the switch.