Go to Post Physics is not a religion. - Jack Jones [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-06-2005, 22:11
KChampion KChampion is offline
Registered User
no team
 
Join Date: Jun 2005
Location: Chicago,IL
Posts: 1
KChampion is an unknown quantity at this point
CMUcam 2 problems

Ok here is the situation we are using the original CMUcam and we have to code loaded and the camera mounted. Our problem is that its not working, we tried different baud rates we tried the CMUCam2 and on the LCD display all we get is CMU Prg and a bunch of parameters, but its not all the ones that its supposed to display, it only displays half of the parameters and only one servo works and it drives in a circle, its not picking up the object.. So here is the schematic and code, i hope someone can help us here. Since the CMUcam is not working we went to the CMUCam2, So if anyone can help use i would appreciate it alot. We are currently using the CMUcam2 but if anyone has anymore info about either cams.

Code

'Camera Tracking Program

define osc 16

recdata var byte[10]
x var byte
confid var byte

trisb=0
portb=0

pause 1500
serout portb.1,6,["CMU Prg."]
serout portb.2,2,["RS", 13]
pause 1250

'Reset Camera
serout portb.2,2,["RS", 13]

gosub display

'Turn green camera LED on
serout portb.2,2,["L1 1",13]
gosub display
portb.3 = 1

'Turn on auto lighting adjust & flourscent band filter
serout portb.2,2,["CR 45 7 18 44", 13]
gosub display

serout portb.1,6,["A L"]

pause 20000

'Turn off auto lighting adjust
serout portb.2,2,["CR 18 44 19 32", 13]
gosub display

'Turn green Camera LED off
serout portb.2,2,["L1 2",13]
gosub display
portb.3 = 0

'Set poll mode--1 packet
serout portb.2,2,["PM 1", 13]
pause 100

'Set raw data
serout portb.2,2,["RM 3", 13]

for x = 0 to 10
portb.3 = 1
pause 250
portb.3 = 0
pause 250
next x

portb.6 = 1
'Track window command looks at center of Camera window
'Grabs data and sends it to track color function
'Track:
serout portb.2,2,["TW", 13]

pause 2000

portb.6 = 0

main:

portb.3 = 1

'Send command--track
'Will track last color grabbed by TW command
serout portb.2,2,["TC", 13]

'Gather the m statistics packet from TW command
serin2 portb.0,84,[str recdata\10]

confid = recdata[9]

if recdata[2] > 50 and confid > 20 then left
if recdata[2] < 40 and confid > 20 then right
if recdata[8] < 175 and confid > 25 then fwd
if recdata[8] > 200 and confid > 25 then bwd

serout portb.1,6,[254,1,"S"]
portb.3 = 0
pulsout portb.4, 668
pulsout portb.5, 676
pause 18
portb.3 = 1
goto main

left:
serout portb.1,6,[254,1, "L", #recdata[2]]
for x= 1 to 7
pulsout portb.4, 696
pulsout portb.5, 676
pause 20
next x
goto main:

right:
serout portb.1,6,[254,1,"R",#recdata[2]]
for x= 1 to 7
pulsout portb.4, 668
pulsout portb.5, 648
pause 20
next x
goto main:

fwd:
serout portb.1,6,[254,1, "F" , #recdata[8]]
for x= 1 to 7
pulsout portb.4, 696
pulsout portb.5, 648
pause 20
next
goto main:

bwd:
serout portb.1,6,[254,1,"B" , #recdata[8]]
for x= 1 to 7
pulsout portb.4, 640
pulsout portb.5, 704
next x
goto main:

display:

serin2 portb.0,84,20,main, [str recdata\3]

for x = 0 to 3
serout2 portb.1,16468,[" ",recdata[x]]
next x
pause 1500
serout2 portb.1,16468,[254,1]
return
Attached Thumbnails
Click image for larger version

Name:	Robot.JPG
Views:	74
Size:	34.8 KB
ID:	3465  
  #2   Spotlight this post!  
Unread 07-06-2005, 10:39
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: CMUcam 2 problems

Mr. Champion,

This forum is for the FIRST robotics competition where high school students build robots and compete in a structured environment.

We used a PIC based controller with no LCD display and RC/hobby servos in last year's competition. It looks like you are using a Basic Stamp with "real" servos which is very different...

I think you may have posted on the wrong forum...

Regards,

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CMUcam setup Ryan Collings Programming 26 13-01-2006 01:00
Autonomous: CMUCam or dead reckoning? Andrew Blair Rules/Strategy 18 26-02-2005 19:36
Robot Rodeo - fixing control problems Gary Dillard Off-Season Events 7 26-10-2004 00:46
Do you all have problems with.... Munkaboo Website Design/Showcase 19 03-03-2003 19:51
Radio problems -- not archiver 2000 1 23-06-2002 22:23


All times are GMT -5. The time now is 16:08.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi