View Single Post
  #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.