View Single Post
  #1   Spotlight this post!  
Unread 23-02-2004, 17:30
mtrawls's Avatar
mtrawls mtrawls is offline
I am JVN! (John von Neumann)
#0122 (NASA Knights)
Team Role: Programmer
 
Join Date: Mar 2003
Location: Hampton, VA
Posts: 295
mtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to behold
Send a message via AIM to mtrawls
Help with pots/interrupts

Arg! I've hit the wall. Unfortunately, the responsibility of getting all of our electronics/programming is heavily on me, and I've come to a dead end. I've gotten about 3 hours of sleep in as many days, and the deadline is approaching ... and the only reason I have time to post here is because I'm about to take a linear algebra test, and had to stop working on the robot temporarily for the night, so I'm somewhat streched for nerves, but here goes:

We're trying to use pots to get finer control. I put a multimeter on the ground/signal leads of the pwm cable it is attached to, and I get 0-10k Ohms varying like it should -- so it seems to me that the wiring is okay. It is plugged into analog input 1. In the program I say:
Code:
printf ("The pot value is: %d\n", (int) rc_ana_in01);
Yet the print statement prints the same value over and over again, even when the pot is being turned! Any insight, or debugging suggestions would be greatly appreciated.

And, being held up in that matter, I turned to work on the autonomous mode. I had it working fine for the EduBot. I changed out the version for the FRC, and tried to get that working. After a while, I isolated the problem to figuring out that the Clock variable is 0 -- and never increases. The timer 1 interrupt is programmed, straight from Ken Watson as a matter of fact ... yet it doesn't increment. I realize some code might help, but as I said, I'm about to take a test and the code is on the team laptop, so I'll get around to it sometime tomorrow maybe.

Thank you,
A much distressed programmer.