View Single Post
  #3   Spotlight this post!  
Unread 04-02-2005, 08:45
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,801
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: 4-Digit feedback from bot

Quote:
Originally Posted by Hershey
The way that we wanted see the values we were getting was to use the 4-Digit LEDS that usually display the team number.
An example is provided in the FrcCode2005v2.2 version of the default code.
Look in user_routines.c at the very bottom and you will see the lines:
Code:
else /* User Mode is On - displays data in OI 4-digit display*/
{
	User_Mode_byte = backup_voltage*10; /* so that decimal doesn't get truncated. */
}
This sets those OI digits to show the backup battery voltage (in tenths of volts). You can set User_Mode_byte equal to your pot, but you must shift the value 2 bits.
As Alan mentioned, you are limited to three of the display digits (a one byte 0-255 value).

To see this displayed on the OI, push the tiny select button on the OI until a "u" is displayed in the left most digit.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 04-02-2005 at 08:47.