Hello Arduino gang.
My first post here. I am trying to use my Arduino UNO as a bridge between two communication ports (COM11 and COM3) in my laptop.
So far, I can send a byte from the Arduino serial monitor (COM11) to the USB Arduino connector and read it as echo in in the Arduino serial monitor, and, I am receiving in the other port (COM3) monitored with hyper-terminal the "same byte" from from the Pin0 (RX), pin1 (TX) and pin GND) of the Arduino board. Here the issue:
If for example, I press the key 1 and hit send in the Arduino serial monitor, I received 49 (DEC) as echo in the Arduino serial monitor and also I receive 67 (HEX) in my hyper-terminal. For 2, I get 50 (DEC) and 33 (HEX), for F, I receive 70 (DEC) and 2E (HEX), etc.
After a brief research, I don't see any relationship between what I get in both terminals. What I need is to read the same or equivalent data in both ports. Am I doing something wrong?
Here my code:
byte rx_byte;
void setup() {
Serial.begin(115200);
}
void loop() {
if (Serial.available() > 0) {
rx_byte = Serial.read();
Serial.print(rx_byte);
}
}
Thank you.