Go to Post Note: Please don't actually mob them or cause them any harm. It's just a saying people. :) - CalTran [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 09-02-2004, 19:41
Code\\Pilot Code\\Pilot is offline
< Only smart people see my avatar
AKA: Rafael Estrada
FRC #1065 (Tatsu)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Florida
Posts: 53
Code\\Pilot is an unknown quantity at this point
Send a message via AIM to Code\\Pilot Send a message via MSN to Code\\Pilot
Autonomous problem.

Guys, I wanna know if is me or the original code that has a problem.
I tried this dead reckoning code con the user_routines part of the code and it work sooo good, the robot even did the cha-cha(no, not really, it was more like mambo). Anyway, I copied the code and pasted it in the user_routine_fast, build it, download it, it was fine, then came the time to test it.
I turn on the robot, turn on the OI, then plug a paper clip on the competition port for activating the autonomous, the autonomous light flashed blinking yellow telling me that the autonomous is on, but betty(that's how i call my bot) did not run :ahh: :ahh: . The controller showed no problem :confused: , it said it was fine, but it did not run, it was like if i had no code in there.

So I said, i will go and ask for the help form the incredible wise people :D in the chief delphi forum.
So please help me :) .
I been stuck with like for ever :( .
Thanks.

Code\\monkey.
__________________
Join the Red revolution, give me some RED rep!!!!
if it doesn't work, don't force it. Go get a bigger hammer.

int run = 0;
int robot_chasing_you = 1;

if (robot_chasing_you)
{
run = 254;
}

I got 48 Gmail invites left, pm me with your e-mail so i can send you one.
  #2   Spotlight this post!  
Unread 09-02-2004, 20:44
Code\\Pilot Code\\Pilot is offline
< Only smart people see my avatar
AKA: Rafael Estrada
FRC #1065 (Tatsu)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Florida
Posts: 53
Code\\Pilot is an unknown quantity at this point
Send a message via AIM to Code\\Pilot Send a message via MSN to Code\\Pilot
Re: Autonomous problem.

please somebody answer, i am gonna cry...

Code\\monkey.
__________________
Join the Red revolution, give me some RED rep!!!!
if it doesn't work, don't force it. Go get a bigger hammer.

int run = 0;
int robot_chasing_you = 1;

if (robot_chasing_you)
{
run = 254;
}

I got 48 Gmail invites left, pm me with your e-mail so i can send you one.
  #3   Spotlight this post!  
Unread 09-02-2004, 20:52
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Autonomous problem.

What is the status of the program light on the RC? Also could you post the code? that might help a bit
__________________
1139 Alumni
  #4   Spotlight this post!  
Unread 09-02-2004, 20:57
ShadowKnight's Avatar
ShadowKnight ShadowKnight is offline
Registered User
FRC #1719 (Umbrella Corporation)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Alexandria, VA
Posts: 142
ShadowKnight has a spectacular aura aboutShadowKnight has a spectacular aura about
Re: Autonomous problem.

aye, if we could see the code you tried running, that would be great. It is possible that you pasted the autonomous code into the wrong section of user_routine_fast.c
__________________
Gracious Professionalism isn't simply courtesy or tradition, it's a way of life

I met her through FIRST...

We only are where we are by God's providence and by no other...
  #5   Spotlight this post!  
Unread 10-02-2004, 08:59
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Autonomous problem.

Just as a suggestion, I don't know if you've tried resetting the controller or not, but that sometimes helps.

Post your code and maybe we can help.
__________________

  #6   Spotlight this post!  
Unread 10-02-2004, 09:50
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
Re: Autonomous problem.

Your code might be missing the Generate_Pwms function, see this post:
http://www.chiefdelphi.com/forums/sh...86&postcount=2

I believe almost everyone using pwms 13-16 have had this problem. This post has the best example of what you need to do. They just call the default routine here, but just insert your code in between the get and put. Add in the Generate_Pwms function if you are missing it.
__________________
"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"
  #7   Spotlight this post!  
Unread 10-02-2004, 17:57
Code\\Pilot Code\\Pilot is offline
< Only smart people see my avatar
AKA: Rafael Estrada
FRC #1065 (Tatsu)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Florida
Posts: 53
Code\\Pilot is an unknown quantity at this point
Send a message via AIM to Code\\Pilot Send a message via MSN to Code\\Pilot
Re: Autonomous problem.

Sorry, i forgot to paste the code. Here it is:

int count = 0;
short end_program = 0; /* will keep program from looping */

void User_Autonomous_Code(void)
{

while (autonomous_mode) /* DO NOT CHANGE! */
{
if (statusflag.NEW_SPI_DATA) /* 26.2ms loop area */
{
Getdata(&rxdata); /* DO NOT DELETE, or you will be stuck here forever! */
if (count < 100)
{
pwm14 = 2000;
pwm16 = 2000; /* supose to go forward while count <100*/
count++;
}



Putdata(&txdata); /* DO NOT DELETE, or you will get no PWM outputs! */
}

}
}



this is found in user_routines_fast, under the function name User_Autonomous_Code.

The LED on the RC says autonomous is activated (blinking yellow) when I initiate the mode on the OI.
So, basically what happens is that the autonomous initiate, but is like not reading the code i wrote.

Thanks.
__________________
Join the Red revolution, give me some RED rep!!!!
if it doesn't work, don't force it. Go get a bigger hammer.

int run = 0;
int robot_chasing_you = 1;

if (robot_chasing_you)
{
run = 254;
}

I got 48 Gmail invites left, pm me with your e-mail so i can send you one.
  #8   Spotlight this post!  
Unread 10-02-2004, 18:18
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Autonomous problem.

first of all, the pwm values should only range from 0 (full reverse) to 254 (full forward)

second, if you are using pwms 13-16, you'll need to include the call to Generate_Pwms in the while(autonomous_mode) loop.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #9   Spotlight this post!  
Unread 10-02-2004, 19:40
Code\\Pilot Code\\Pilot is offline
< Only smart people see my avatar
AKA: Rafael Estrada
FRC #1065 (Tatsu)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Florida
Posts: 53
Code\\Pilot is an unknown quantity at this point
Send a message via AIM to Code\\Pilot Send a message via MSN to Code\\Pilot
Re: Autonomous problem.

Thank you, thank you, thank you.
I just figured it out.
It was the stupidiest thing there could be.
ADVICE : when you can't think clearly enough, take a break and double check.

I found out that the pwm cables were in pwm13 and pwm15, and i was using 14 an 16.
Isnt that dumb????? well, the good thing is that I have autonomous running and i am so happy.

Thanks guys for the help, i found some tips very useful.
ok bye.

Code\\monkey
__________________
Join the Red revolution, give me some RED rep!!!!
if it doesn't work, don't force it. Go get a bigger hammer.

int run = 0;
int robot_chasing_you = 1;

if (robot_chasing_you)
{
run = 254;
}

I got 48 Gmail invites left, pm me with your e-mail so i can send you one.
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
A better autonomous method.. randomperson Programming 4 24-02-2004 18:02
autonomous mode problem on field Chris_C Programming 17 26-03-2003 19:11
Ok one problem cantwell03 Programming 3 13-02-2003 07:28
Autonomous Kill Switch UCGL_Guy Programming 8 15-01-2003 17:39
Major problem with chipphua motors aka Scott White Motors 18 19-03-2002 19:44


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

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