Arduino Sketch serial monitor for Serial1

Discussion in 'UDOO 101' started by y.seksit, May 8, 2014.

  1. y.seksit

    y.seksit New Member

    Joined:
    May 8, 2014
    Messages:
    17
    Likes Received:
    0
    Hi,
    I just newbies for UDOO. I try to use Serial Monitor on Arduino to monitor Serial1 but it doesn't print out like Serial0, How can i fixed it?
    Thanks
     
  2. peter247

    peter247 Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    What are you doing ? ,
    Are you monitoring the Rx line of Serial_1 and echoing it to Tx Serial_0 or are you using a Serial to USB convertor ?.
    Give a little more detail of what you are doing !!!!
     
  3. y.seksit

    y.seksit New Member

    Joined:
    May 8, 2014
    Messages:
    17
    Likes Received:
    0
    I want to monitoring Serial1.
    when i use code below on Serial0 i can use Serial Monitor ( Tool > Serial Monitor ) on Arduino sketch to monitor string send out
    void setup(){
    Serial.begin(9600);
    }
    void loop(){
    Serial.write("Hello world");
    }

    but when i try with Serial1 (Serial1.write or Serial1.println ), can it possible to print out to Serial Monitor?
     
  4. peter247

    peter247 Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    If you want to transmit on two serial port at the same time the same message, just echo to both ports, but I think you are a little confused what should happen.

    {
    Serial1.begin(9600);
    Serial.begin(9600);
    }
    void loop(){
    Serial.write("Hello world");
    Serial1.write("Hello world");
    }

    The first serial port on the ardiono side is connected to the uart3 on the linux side , so both side can commutate with each other and this is the port you see in the monitor , the other ports are for you to connect to other serial device like a serial printer , rfid scanner etc. , they are not monitored directly they just go to that device.
     
  5. y.seksit

    y.seksit New Member

    Joined:
    May 8, 2014
    Messages:
    17
    Likes Received:
    0
    Thanks Peter
     
  6. peter247

    peter247 Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    Have you a use for two serial port or is it just play time ? , which is the best way to learn .
     
  7. y.seksit

    y.seksit New Member

    Joined:
    May 8, 2014
    Messages:
    17
    Likes Received:
    0
    I using two serial port, one for GPS and other one for minitoring. may i confuse which one serial port connected to UART3 on linux.
     
  8. peter247

    peter247 Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    Uart3 ( Linux side ) is what you seeing in the monitor (/dev/ttymxc3 ), so you have answered your own question that you can only see it with , Serial.write("Hello world");
    But It all depends on the jumpers too, if the arduino serial is connected to uart 3 or to the mico usb cn6 port.
     

Share This Page