Thread: buttons
View Single Post
  #9   Spotlight this post!  
Unread 11-01-2003, 04:04
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: more help

Quote:
Originally posted by rosebud
hmmm...thanks for the alternate advice, but whats wrong with what i wrote? i hate unsolved programming bugs. they keep me up at night, and when i fall asleep its to dream of possible reasons for the bug. also, my team mates and i were wondering what the difference was between using an if statement or a button statement. i suppose all the loop stuff... could it do with an interrup or something like in java?
thanks
I can't explain why your eduBot code works. Maybe you could post that code for me to analyze too. But I do know why it won't work on the full sized robot controller. Please reread my previous post. YOU CANNOT USE THE BUTTON COMMAND IN THIS APPLICATION (the innovation first full size robot controller.)

Just to dig a little further: the PIN parameter on your BUTTON command (p4_sw_aux1) is a bit sized variable. Which means that when the BUTTON command is executed, it will sometimes read pin 0 and sometimes pin 1 (depending upon the state of the switch on the OI). I don't know what, if anything, is connected to pin 0 inside the RC, but pin 1 is the pin the serin command uses to read its data from the master microprocessor. In either case, you're NOT reading aux switch 1 on port 4 on the operator interface which is what I believe was your intention.

As for the target state parameter, I'm afraid I don't know which way it's going to work. I think I saw the same conflicting information you saw: 1) was in the command description, and 2) was from the example code. Am I correct? I don't know of any way (using either the eduBot or the full sized robot controller) to check which way it will work, but my team has one of Parallax's BOE 'Bots. Maybe if I get a round tuit one of these days, I will check it out.
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me

Last edited by Greg Ross : 11-01-2003 at 04:27.