Quote:
Originally posted by randomperson
Displaying a number on the OI? How is this done.. I could never find anything about that anywhere... just goes to show how well I read instruction manuals
|
Here is the code I use which accomplishes this:
Code:
get AUTON_PROG_NUM, temp10
out8 = temp10.bit0
out9 = temp10.bit1
out10 = temp10.bit2
out11 = temp10.bit3
out12 = temp10.bit4
out13 = temp10.bit5
out14 = temp10.bit6
out15 = temp10.bit7
Now I just realized that I should be able to do this without setting the bits individually. The following SHOULD work, but I haven't tried it, so don't sue me if it doesn't work for you.
Code:
get AUTON_PROG_NUM, OUTH
OUTH is a predefined byte variable that encompasses all the output pins 8 through 15.
[edit] This will display the value in temp10 on the 3 (or 4) digit display on the operator interface when the OI is in user display mode. You put your OI into user display mode using the same select button with which you tell the OI to display the team number, radio channel, or robot battery voltage. You can recognize that the OI is in user mode when two decimal points appear in the display. When the OI is NOT in user mode, out7 through out15 are displayed by the PWM and relay indicator LEDs on the OI.[/edit]