ARDUINO 328 Functions Serial Link
From ROBOTC API Guide
| Line 3: | Line 3: | ||
<br /> | <br /> | ||
| − | The Arduino | + | The 328P-Based Arduino has 1 serial ports. This serial port is typically reserved for use for downloading programs and using the ROBOTC debugger. Users can change the serial port to have control over the RX and TX lines, but doing so will render the ROBOTC debugger useless. Users may also experience an issue when trying to download new code after running a program that modifies the Serial Port for non-system use - We are currently working on this issue, but the temporary work around is to download the ROBOTC firmware again to restore normal functionality. |
| − | [[File: | + | [[File:SerialPortsUno.png]] |
{{tl|1|1}} | {{tl|1|1}} | ||
Latest revision as of 14:16, 11 May 2012
ARDUINO → Functions and Variables → 328 Serial Link
The 328P-Based Arduino has 1 serial ports. This serial port is typically reserved for use for downloading programs and using the ROBOTC debugger. Users can change the serial port to have control over the RX and TX lines, but doing so will render the ROBOTC debugger useless. Users may also experience an issue when trying to download new code after running a program that modifies the Serial Port for non-system use - We are currently working on this issue, but the temporary work around is to download the ROBOTC firmware again to restore normal functionality.
|
| |||||||
getChar
| short getChar(const TUARTs nPort) | |||||||
| (short) Function will retrieve the next character from the buffer that was sent to port 'nPort'.
|
sendChar
| void sendChar(const TUARTs nPort, short nChar) | ||||||||||
| (void) Function will send the next character to port 'nPort'.
|
setBaudRate
| void setBaudRate(const TUARTs nPort, TBaudRate nBaudRate) | ||||||||||
| (void) Function will set the Baud Rate for port 'nPort'.
Acceptable Baud Rates: 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 200000, 230400 and 250000.
|
configureSerialPort
| void configureSerialPort(const TUARTs nPort, TSerialPortMode nMode) | ||||||||||
| (void) This function will manually configure the serial port for a specific mode (system, user, Xbee, VEX LCD, etc). You can also set this same functionality using the "Motors and Sensor Setup" window.
|
bXmitComplete
| bool bXmitComplete(const TUARTs nPort) | |||||||
| (bool) Function will return if the transmit (Xmit) buffer is empty.
|
