View Single Post
  #2   Spotlight this post!  
Unread 22-05-2010, 03:57
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: WPILib & LCD Display

WriteSerialPortOne and WriteSerialPortTwo should write a single character to the first and second serial ports respectively. To write a null-terminated string to the first serial port, you could use a function such as

Code:
void puts(char *str)
{
   while(*str)
   {
      WriteSerialPortOne(*str++);
   }
}
Of course, make sure you've opened the serial port before trying to read or write with it, and that you pass one of the baudrate constants to the open function; it sounds like you would want something like OpenSerialPortTwo(BAUD_9600);

It seems like you probably could have figured this yourself, though, so let me know if I've misinterpreted your question.

--Ryan
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor