Go to Post Sometimes the best feeling doesn't come from watching yourself excel but rather from watching others excel. - kristenliz_28 [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 13-07-2005, 20:23
Oumonkey's Avatar
Oumonkey Oumonkey is offline
Master of the If statement
AKA: Josh Tyus
FRC #1555 (Pulse)
Team Role: Programmer
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Monon, IN
Posts: 50
Oumonkey has a spectacular aura aboutOumonkey has a spectacular aura about
poor little newbish programmer needing help

Hi, I am new to programming and I don't know much about it but I am slowly getting it and first I would like to know if there is a guide that goes more in detail about programming in the buttons on the joystick, I probably have something but I have hundreds of pages of stuff and have no clue on what I need to know.
But my major problem now is putting in the new code in the....robot controller, ya thats is!, I hold down the prog button on till the program state led is orange and click download. it finishes and a window pops up....now I have no clue what it is, it had a ton of x=0 and y=0 stuff scrolling down, we left it going for about 5 minutes and still going, Which might be our problem I never found anything on it so I wasn't sure what it was supposed to do or if it was of any importance. We got out of it and followed the instruction in he "2004 Full-Size Robot controller Reference guide" that I got from FIRSTS website or maybe here I don't remember, we tried it 3 times and it still won't upload the new code. But all we are trying to do is put a 2 joystick drive into 1. Which was on an older code and I put in that code part for 1 joystick which I checked that thing a million times and saved it. and I made sure I was loading the right code, but it still won't go! I brained my hurt.
So please excuse my bad spelling and grammar and Thanks in advance for any help. I hope I typed it in a readable manor.

EDIT Hey theres a spell check button
__________________

Last edited by Oumonkey : 13-07-2005 at 23:30.
  #2   Spotlight this post!  
Unread 13-07-2005, 20:45
mechanicalbrain's Avatar
mechanicalbrain mechanicalbrain is offline
The red haired Dremel gnome!
FRC #0623 (Ohm robotics)
Team Role: Electrical
 
Join Date: Apr 2005
Rookie Year: 2004
Location: Virginia
Posts: 1,221
mechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond repute
Send a message via AIM to mechanicalbrain Send a message via Yahoo to mechanicalbrain
Re: poor little newbish programmer needing help

go to the FIRST website and in robotics section there is a specific guide to programming.
__________________
"Oh my God! There's an axe in my head."
623's 2006 home page
random mechanicalbrain slogans

  #3   Spotlight this post!  
Unread 13-07-2005, 20:48
Mike Schroeder's Avatar
Mike Schroeder Mike Schroeder is offline
Gone the way of the dinosaur
AKA: "Big Mike"
no team
 
Join Date: Jul 2001
Rookie Year: 1999
Location: North Brunswick, NJ
Posts: 1,872
Mike Schroeder has a reputation beyond reputeMike Schroeder has a reputation beyond reputeMike Schroeder has a reputation beyond reputeMike Schroeder has a reputation beyond reputeMike Schroeder has a reputation beyond reputeMike Schroeder has a reputation beyond reputeMike Schroeder has a reputation beyond reputeMike Schroeder has a reputation beyond reputeMike Schroeder has a reputation beyond reputeMike Schroeder has a reputation beyond reputeMike Schroeder has a reputation beyond repute
Send a message via AIM to Mike Schroeder Send a message via Yahoo to Mike Schroeder
Re: poor little newbish programmer needing help

There is a vast amount of programming information availibe to you either

through this website, the IFI website or various other members personal websites dedicated to programing (Kevin Watson comes to mind)

here are a few links i found just searching the Programing Forum here on CD

http://www.chiefdelphi.com/forums/sh...ad.php?t=30976 (a programmers guide so to speak)

http://www.chiefdelphi.com/forums/sh...ad.php?t=32870 ( the 2005 automode scripting manual)

and last but not least http://www.chiefdelphi.com/forums/se...earchid=447110 ( a search of the site using the terms progamming the RC)


I hope that helps,
__________________
GOT SEARCH?

"We choose to go to the moon. We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard"-JFK
  #4   Spotlight this post!  
Unread 13-07-2005, 21:22
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,355
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: poor little newbish programmer needing help

Quote:
Originally Posted by Oumonkey
Hi, I am new to programming and I don't know much about it but I am slowly getting it and first I would like to know if there is a guide that goes more in detail about programming in the buttons on the joystick, I probly have something but I have hundreds of pages of stuff and have no clue on what I need to know.
Hey Josh, welcome to the wonderful world of programming. The learning curve is a little steep at first, but once you get started , it comes faster. The document you already have is a great help and does have info on setting inputs to outputs and or actions. It is not really detailed, but pushes you in the right direction.

Quote:
Originally Posted by Oumonkey
But my major problem now is putting in the new code in the....robot controller, yay thats is!, I hold down the prog button ontill the program state led is orange and click download. it finishes and a window pops up....now I have no clue what it is, it had a ton of x=0 and y=0 stuff scrolling down, we left it going for about 5 minites and still going, Which might be our problem I never found anything on it so I wasn't sure what it was supposed to do or if it was of any importance.
The window that popped up is a terminal window. It is displaying the data that is being sent to it by a "printf" command. You can probably find the line calling it in the user_routines.c file in the "Process_Data_From_Master_uP" function. It will be somewhere around line# 190, depending on what modifications you may have made to the file.

Quote:
Originally Posted by Oumonkey
...all we are tryin' to do is put a 2 joystick drive into 1. Which was on an older code and I put in that code part for 1 joystick which I checked that thing a million times and saved it.
I think what your saying is you are trying to set up the drive system for single joystick drive, correct? If so, the default code already handles it. Look near line 240 of the default code. There is a comment block that describes how to hook up the drive motors and the code that mixes the X and Y axis of port 1. It's all there already for you.
Hope that helps.
  #5   Spotlight this post!  
Unread 13-07-2005, 23:29
Oumonkey's Avatar
Oumonkey Oumonkey is offline
Master of the If statement
AKA: Josh Tyus
FRC #1555 (Pulse)
Team Role: Programmer
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Monon, IN
Posts: 50
Oumonkey has a spectacular aura aboutOumonkey has a spectacular aura about
Re: poor little newbish programmer needing help

Thanks yall.
But we had it set to 2 joystick and we are trying to load the 1 joystick code but the thing never...uh well downloads. It goes through the download process the terminal window pops up and then thats about as far as we can get it. We followed the instructions in the paper I mentioned earlier but it doesn't like me
Sorry if I am being vague But I can't help it
But we MIGHT have 2 people helpin' us tomorrow I hope they show up.
EDIT: And I allready went to the FIRST web site. I downloaded that long video and it helped a bit but didn't help me to much
But thanks for that autonomous mode thing. I will have to play with that for next year
__________________

Last edited by Oumonkey : 13-07-2005 at 23:34.
  #6   Spotlight this post!  
Unread 13-07-2005, 23:51
mechanicalbrain's Avatar
mechanicalbrain mechanicalbrain is offline
The red haired Dremel gnome!
FRC #0623 (Ohm robotics)
Team Role: Electrical
 
Join Date: Apr 2005
Rookie Year: 2004
Location: Virginia
Posts: 1,221
mechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond repute
Send a message via AIM to mechanicalbrain Send a message via Yahoo to mechanicalbrain
Re: poor little newbish programmer needing help

are you the only person doing pogramming on your team?
__________________
"Oh my God! There's an axe in my head."
623's 2006 home page
random mechanicalbrain slogans

  #7   Spotlight this post!  
Unread 14-07-2005, 00:00
Oumonkey's Avatar
Oumonkey Oumonkey is offline
Master of the If statement
AKA: Josh Tyus
FRC #1555 (Pulse)
Team Role: Programmer
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Monon, IN
Posts: 50
Oumonkey has a spectacular aura aboutOumonkey has a spectacular aura about
Re: poor little newbish programmer needing help

Unfortunately Yes, our old programmer graduated and....well he said he wasn't going to help us....But supposedly he is going to be there tomorrow but well see. We do have a few mentors who can help us but I didn't think I would have the problem loading in the code
And I am going to try and go through everything I have to see if it can help me before out meet tomorrow. Sometimes I REALLY don't like computers
EDIT: And we have only 6 current members 2 are more on the PR side so they aren't relay knowledgeable in much of the robo stuff, we have 1 who is doing a lot of the design and 1 electrical. The 4th is our Friend who we kinda dragged into this but he has some decent tool knowledge. And we have 2 mentors helping us on alto of the build. But we were kinda amazed at how many people were on the other teams. Seeing 90 people to our 6 kinda makes me think that I really do live in a "farming community" to say it nice
EDIT 2: Man I have bad grammar
EDIT 3: I like your pancake bunny
__________________

Last edited by Oumonkey : 14-07-2005 at 00:06.
  #8   Spotlight this post!  
Unread 14-07-2005, 00:18
sciguy125 sciguy125 is offline
Electrical Engineer
AKA: Phil Baltar
FRC #1351
Team Role: College Student
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Sunnyvale, CA
Posts: 519
sciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond reputesciguy125 has a reputation beyond repute
Send a message via AIM to sciguy125 Send a message via MSN to sciguy125 Send a message via Yahoo to sciguy125
Re: poor little newbish programmer needing help

Quote:
Originally Posted by Oumonkey
Thanks yall.
But we had it set to 2 joystick and we are trying to load the 1 joystick code but the thing never...uh well downloads. It goes through the download process the terminal window pops up and then thats about as far as we can get it.
How are you so sure it never downloads? If the program state led turns green, it probably did download correctly. If the terminal window pops up, that probably also means that it worked. Did you actually try moving the joysticks to see what they do?
__________________

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE/S/P a-- e y-- r-- s:++ d+ h! X+++
t++ C+ P+ L++ E W++ w M-- V? PS+ PE+
5- R-- tv+ b+ DI+++ D- G
------END GEEK CODE BLOCK------
  #9   Spotlight this post!  
Unread 14-07-2005, 08:33
EricS-Team180's Avatar
EricS-Team180 EricS-Team180 is offline
SPAM, the lunchmeat of superheroes!
AKA: Eric Schreffler
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Stuart, Florida
Posts: 561
EricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond repute
Re: poor little newbish programmer needing help

...ya know, you might just want to check that the file you are selecting in the IFI loader window is really the file you WANT to load. I can remember times of loading the frc default file by accident - all the while thinking it was our modified version. ...just one of those silly things...
__________________

Don't PANIC!
S. P. A. M.
  #10   Spotlight this post!  
Unread 14-07-2005, 09:55
Oumonkey's Avatar
Oumonkey Oumonkey is offline
Master of the If statement
AKA: Josh Tyus
FRC #1555 (Pulse)
Team Role: Programmer
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Monon, IN
Posts: 50
Oumonkey has a spectacular aura aboutOumonkey has a spectacular aura about
Re: poor little newbish programmer needing help

We tried moving the joysticks everytime and the samething happened.
And I am almost positive that I was loading the right file. That was something I thought of and checked it out many times.
__________________
  #11   Spotlight this post!  
Unread 14-07-2005, 10:44
Dave Scheck's Avatar
Dave Scheck Dave Scheck is offline
Registered User
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Feb 2003
Rookie Year: 2002
Location: Arlington Heights, IL
Posts: 574
Dave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond reputeDave Scheck has a reputation beyond repute
Re: poor little newbish programmer needing help

Josh

I am confident that the code is getting downloaded to the RC correctly, and that there is some other problem with your setup.

Since you're seeing the "x = 0 y = 0", try this...find the line in your code that is doing the console print. It will look something like
Code:
printf("x = %d y = %d",x,y);
Change the "x = " to "x2 = ", recompile and download your code. This time if you should see "x2 = 0 y = 0" scrolling on your console you know that your code is being downloaded correctly. (When you're done with this test, don't forget to change the x2 back to x)

Moving on, here is a list of things you may want to check...

1. Do you have the joystick in the right port? I think that the default code uses port 1.

2. Do you have the motors connected to the right outputs on the RC? The default will send the right drive signal to PWM13 and PWM 14 and the left drive signal to PWM 15 and PWM16.

3. PWM outputs 13-16 are a little different than 1-12 in that the user has to specifically generate the outputs. This is called as follows and should be found in the Process_Data_From_Master_uP function after the call to Default_Routine.
Code:
Generate_Pwms(pwm13,pwm14,pwm15,pwm16):
4. Is your robot enabled? Most teams create an enable/disable switch so that the robot can be safely disabled while debugging. If you aren't using one, I would highly suggest making one for your safety and the safety of anyone within arms reach of your robot. Plans can be found here

If you're still having problems after checking the above things, post your user_routines.c and we can take a closer look as to what your program's actually doing. (Don't forget to put it in a code block if you do)

By the way, Mark McLeod started a pretty good thread about starting to program FIRST robots. You may want to take a look here.
  #12   Spotlight this post!  
Unread 14-07-2005, 17:31
Oumonkey's Avatar
Oumonkey Oumonkey is offline
Master of the If statement
AKA: Josh Tyus
FRC #1555 (Pulse)
Team Role: Programmer
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Monon, IN
Posts: 50
Oumonkey has a spectacular aura aboutOumonkey has a spectacular aura about
Re: poor little newbish programmer needing help

Quote:
Originally Posted by Dave Scheck
Josh

I am confident that the code is getting downloaded to the RC correctly, and that there is some other problem with your setup.

Since you're seeing the "x = 0 y = 0", try this...find the line in your code that is doing the console print. It will look something like
Code:
printf("x = %d y = %d",x,y);
Change the "x = " to "x2 = ", recompile and download your code. This time if you should see "x2 = 0 y = 0" scrolling on your console you know that your code is being downloaded correctly. (When you're done with this test, don't forget to change the x2 back to x)

Moving on, here is a list of things you may want to check...

1. Do you have the joystick in the right port? I think that the default code uses port 1.

2. Do you have the motors connected to the right outputs on the RC? The default will send the right drive signal to PWM13 and PWM 14 and the left drive signal to PWM 15 and PWM16.

3. PWM outputs 13-16 are a little different than 1-12 in that the user has to specifically generate the outputs. This is called as follows and should be found in the Process_Data_From_Master_uP function after the call to Default_Routine.
Code:
Generate_Pwms(pwm13,pwm14,pwm15,pwm16):
4. Is your robot enabled? Most teams create an enable/disable switch so that the robot can be safely disabled while debugging. If you aren't using one, I would highly suggest making one for your safety and the safety of anyone within arms reach of your robot. Plans can be found here

If you're still having problems after checking the above things, post your user_routines.c and we can take a closer look as to what your program's actually doing. (Don't forget to put it in a code block if you do)

By the way, Mark McLeod started a pretty good thread about starting to program FIRST robots. You may want to take a look here.
Well I am going to check everything cause I am about to go to my robotics meet in a few secs, but first
1. Ya we check the controllers in all the slots and it was the original code.
2 I am not personally sure but the person doing electrical says it in the right ones.
3I'll check this as soon as I can. My laptop didn't have the correct port to program into the bot so I had to use a different one so I am going to see If I can borrow it till after the competition.
4 I don't think we are using one but I'll talk it over with my electrical guy to see if we can do it.
I'll try and use a different code this time as well. Cause the code for the robot is the one from out last composition so he might have dint something different to it and I'll get a clean one from the website.
__________________
  #13   Spotlight this post!  
Unread 14-07-2005, 21:40
Oumonkey's Avatar
Oumonkey Oumonkey is offline
Master of the If statement
AKA: Josh Tyus
FRC #1555 (Pulse)
Team Role: Programmer
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Monon, IN
Posts: 50
Oumonkey has a spectacular aura aboutOumonkey has a spectacular aura about
Re: poor little newbish programmer needing help

OK, We got it fixed! A guy named Jason and Flo...Not sure how that is pronounced or if that is even right, I'm kinda tired and hyped up on caffeine. There wasn't anything wrong with the programming . Jason said the terminal window having all 0s had to do with the controller. Apparently something was wrong with one of the victors or the wiring and it runs now! ITS ALIVE!!!!
So thanks for the help guys. And know it looks like after seeing Jason work with the programming, he added some stuff and cleaned it up a bit, we will have another programmer
Thanks y'all!
__________________
  #14   Spotlight this post!  
Unread 14-07-2005, 21:47
mechanicalbrain's Avatar
mechanicalbrain mechanicalbrain is offline
The red haired Dremel gnome!
FRC #0623 (Ohm robotics)
Team Role: Electrical
 
Join Date: Apr 2005
Rookie Year: 2004
Location: Virginia
Posts: 1,221
mechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond reputemechanicalbrain has a reputation beyond repute
Send a message via AIM to mechanicalbrain Send a message via Yahoo to mechanicalbrain
Re: poor little newbish programmer needing help

Glad to see you fixed up your problem.
__________________
"Oh my God! There's an axe in my head."
623's 2006 home page
random mechanicalbrain slogans

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


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

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