
25-01-2012, 08:58
|
|
Registered User
 FRC #4302
|
|
Join Date: Jan 2012
Location: Chicago, Il
Posts: 32
|
|
|
Re: Jaguar Blinking Yellow
Quote:
Originally Posted by bob.wolff68
Ok -- so I've taken a longer look at the code and there are a number of issues. Rather than going over each one individually, I'm going to ask why you don't start with the "FRC SimpleRobot" template instead of trying to write from scratch. The program you have here uses things that the SimpleRobot class doesn't use in the template. That's not a bad thing if you're experienced, but it appears you may be pretty new to this. One of the big items here, however, is that OperatorControl() is called ONCE and you need to have a "while isOperatorControl() { ... }" loop or else it'll call your code, you set a few things, and then a millisecond later, you're no longer running your robot code. It is quite possible that your function calls work on the Jaguar itself, but since SimpleRobot is not being used properly, it appears to be unsuccessful.
I would suggest starting with the template and modifying from there. It'll likely be much less problematic. Also, I'd suggest taking the SimpleRobot docs from the help file and print them out, STUDY them, and highlight/make-notes.
Then if it's still a problem, send me a PM with your phone number and we'll get on the phone and talk it through.
Thanks,
bob
|
Thanks so much! The reason I wrote my own is since the simplerobot template did not do anything. I thought the wait would cause it to spin for 2 seconds and I intended it to be a quick linear run through the code that spun a motor for two seconds and exited. I really appreciate the help.
|