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.