Dear all, thanks in advance for any piece of advise on my problem.
My goal is to have an idea of the structure of a serial data my Arduino Mega is receiving. And since the first serial port is being used by Arduino it appeared I cannot monitor the content of the port (right?).
So I purchased this FTDI Basic Breakout http://www.sgbotic.com/index.php?dispatch=products.view&product_id=968 board and connected it this way:
FTDI Arduino Mega
GND <--> GND
CTS <--> not connected
5V <--> not connected
TXO <--> RX (pin 0)
RXO <--> TX (pin 1)
DTR <--> RESET (I connected the +ve leg of a 0.22uF capacitor to the RESET pin)
I am not sure if the above connection is correct. Anyway, I uploaded the code below to the board and click the Serial Monitor on the IDE but I couldn't see anything. Meanwhile, I can see that the Rx pin of the breakout board is receiving as it kept blinking. The data is comming from RoboRealm, so I want to know how the data is formatted before I can use it.
I will be very grateful for any guidance with respect to this problem. Thanks in advance.
void setup()
{
Serial.begin(4800);
Serial2.begin(4800);
//pinMode(13, OUTPUT);
}
void loop()
{
if( Serial2.available()>0)
{
unsigned char value = Serial2.read();
Serial.print(value);
}
}