We’ve tried setting the competition port on pins 5 and 8. The controller flashes ‘disabled’ but auton_mode isn’t set to 1.
We’ve tried setting our team number to 0. Same result.
We have set our auton_mode variable to 1 and our programs do run from there.
auton_mode VAR PB_mode.bit6
^This is defined.
I’ve tried using the variable PB_mode.bit6 instead of auton_mode and this also does not work.
Is their any chance we got a bad OI that doesn’t set the bit to 1 when auton mode is on? Something like that? Any help is really appreciated.
Let me revise… I wasn’t serin-ing PB_mode and that was the first problem.
The next problem is a Basic Error when I serin PB_mode. I have it declared, I get the error on the robot and not on the Syntax checker in the stamp editor.
Anything else I need to serout with it? Any other things I have to include when serin-ing PB_mode? It really is one of those things where the only thing I change is PB_mode in the serin. With it, error. Without it, no error but no indication of modes.
It sounds to me like your init. constants are wrong. Every c_variablename that you wish to serin must be set to 1, all others must be set to 0. Then, if those are correct, check to make sure the order of your variables is consistant with what the order is in the default code.
*Originally posted by Skabana159 *
**It sounds to me like your init. constants are wrong. Every c_variablename that you wish to serin must be set to 1, all others must be set to 0. Then, if those are correct, check to make sure the order of your variables is consistant with what the order is in the default code. **
To give you a concrete example…
This works:
c_p1_y CON 1
c_p2_y CON 1
...
c_PB_mode CON 0
...
Serin COMA\COMB, INBAUD, [p2_y,p1_y]
This will give you a BASIC Error:
c_p1_y CON 1
c_p2_y CON 1
...
c_PB_mode CON 0
...
Serin COMA\COMB, INBAUD, **PB_mode,**p2_y,p1_y]
This fixes the BASIC Error:
c_p1_y CON 1
c_p2_y CON 1
...
c_PB_mode CON **1**
...
Serin COMA\COMB, INBAUD, [PB_mode,p2_y,p1_y]
Yes they must go in a specific order, but it is not the order of the constants. It is the order of the line right about the serin (the commented out serin)