View Single Post
  #9   Spotlight this post!  
Unread 24-03-2003, 01:26
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
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]
__________________
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 : 24-03-2003 at 01:50.