Go to Post Be realistic in your goals, and relentless in hitting them. - IKE [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-02-2003, 19:51
JP_1163's Avatar
JP_1163 JP_1163 is offline
mentor
#1163 (Trojan Horses)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Faulkton, SD
Posts: 90
JP_1163 will become famous soon enoughJP_1163 will become famous soon enough
Question programming newb

We are at the end of our tether As a team. Our mechanical side is ok but we have no programmers on our team. As a rookie mentor I feel that this is our Achilles heel. Our bot is simple but without an autonomous program we'll sit and spin like a top for the first 15 seconds. Not a pretty sight for our partner and a definite downer for our team.
If our team simply uses the nominal program and doesn't get anything else done I can't see us as a viable alliance partner even if we can go like a bat after the first 15. So, to make a long story short is there a quick and dirty manner to program our machine to do some basic things like move and turn?
I understand the if...then...else concept but am unsure of the minutiae.
I'll be working on a code idea tonight and maybe I can post it here later if someone would assist with a quick correction I'd be willing to accept any assistance offered.

Thanks,

Team 1163
  #2   Spotlight this post!  
Unread 06-02-2003, 19:52
Jeff_Rice's Avatar
Jeff_Rice Jeff_Rice is offline
ElementisRegamusProelium
#1359
Team Role: Programmer
 
Join Date: Dec 2002
Location: Linn County
Posts: 283
Jeff_Rice will become famous soon enoughJeff_Rice will become famous soon enough
Check out the default code, and modify it as you please.

And remember, drive_R is on pwm 13 and 14, drive_L is on pwm 15 and 16

edit/
I'm sorry, I got confused.

I guess you want dead reckoning in the auton mode.

Get a timing code, and change drive_L and drive_R accordingly.

I apologize for misreading your post.
end edit/
__________________
"He said my name is Private Andrew Malone
If you're reading this then I didn't make it home
But for every dream that's shattered another one comes true
This car was once a dream of mine now it belongs to you
And though you may take her and make her your own
You'll always be riding with Private Malone" David Ball, "Private Malone"

Last edited by Jeff_Rice : 06-02-2003 at 19:57.
  #3   Spotlight this post!  
Unread 06-02-2003, 20:31
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
There's a good example in the whitepapers section that you can get here. Other than that, there have been a few threads on this topic recently. Here's a few I've managed to dig up:

http://www.chiefdelphi.com/forums/sh...threadid=16452
http://www.chiefdelphi.com/forums/sh...threadid=15891
http://www.chiefdelphi.com/forums/sh...threadid=16994


If you just want to see some code quickly, here's a sample:

Code:
loopCnt VAR word
loopCnt=0
DO
SERIN...
IF auton_mode = 1 THEN 
	loopCnt=loopCnt+1
	SELECT loopCnt
		CASE <50
			PWM1=254
			PWM2=254
		CASE 50 TO 149
			PWM1=127
			PWM2=254
		CASE 150 TO 219
			PWM1=1
			PWM2=1
		CASE 220 TO 249
			PWM1=127
			PWM2=254
		CASE ELSE
			PWM1=127
			PWM2=127
			PWM3=127
			PWM4=127
	ENDSELECT

ELSE
	PWM1 = (((2000 + p1_y - p1_x + 127) Min 2000 Max 2254) - 2000)
	PWM2 = (((2000 + p1_y + p1_x - 127) Min 2000 Max 2254) - 2000)
ENDIF

SEROUT ....
LOOP
This will cause the robot to go forward, turn, go backwards, turn the other way and then stop. After autonomous mode ends, you will have normal one-joystick drive control. Let me know if you have any questions via PM/email or here.

--Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #4   Spotlight this post!  
Unread 08-02-2003, 23:18
Willum's Avatar
Willum Willum is offline
Registered User
#0871 (Robotechs)
 
Join Date: Jan 2003
Location: West Islip
Posts: 38
Willum is an unknown quantity at this point
Send a message via AIM to Willum
DON'T LISTEN TO THE REST OF THE REPLIES

If you want to get a simple dead reckoning code off the ground look in the white pages here at chief delphi. IT'S SOOO SIMPLE.

Email me if you have any problems with that. Email me.

Wvxc400@optonline.net
871 head honcho programmer/student
  #5   Spotlight this post!  
Unread 08-02-2003, 23:33
n[ate]vw's Avatar
n[ate]vw n[ate]vw is offline
Registered User
#0933 (Adler Attack)
 
Join Date: Jan 2003
Location: Rockford, IL
Posts: 48
n[ate]vw is an unknown quantity at this point
Send a message via AIM to n[ate]vw
DON'T LISTEN TO WILLUM!
The other replies are okay, too.
__________________
Adler Attack #933 -- Trigos
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
Programming Compatition Angela06 Programming 30 08-04-2005 23:12
Hooking up Controller to computer for programming. Dragon45 General Forum 3 30-01-2003 00:22
Pneumatics electrical wiring and programming archiver 2001 1 23-06-2002 23:10
Error found in programming for the pump and pressure switch sjharobotics Programming 4 06-02-2002 17:46
pbasic programming punarhero Programming 4 21-01-2002 23:32


All times are GMT -5. The time now is 17:41.

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