Help using NEO UART

Discussion in 'UDOO NEO' started by Tengoles, Jun 18, 2017.

  1. Tengoles

    Tengoles New Member

    Joined:
    Nov 23, 2016
    Messages:
    14
    Likes Received:
    3
    Hello, I want to use a UART on the board to communicate the NEO with a external device using this simple python script that was done to make this task on a beaglebone black:

    import Adafruit_BBIO.UART as UART
    import serial

    UART.setup("UART1")

    ser = serial.Serial(port = '/dev/ttyO1', baudrate=9600)
    ser.close()
    ser.open()
    while ser.isOpen():
    x = ser.readline()
    print x
    ser.close()

    I believe that the only thing that is needed for this to work is adapting the UART setup part at the beginning. Any help with that?
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Tengoles likes this.
  3. Tengoles

    Tengoles New Member

    Joined:
    Nov 23, 2016
    Messages:
    14
    Likes Received:
    3
    Okay, let's see... First of all, I used the device tree editor and now it looks like this:
    [​IMG]
    Can I assume that the pins have this functions:
    [​IMG]

    Also did the patch mentioned on your link and changed my code to this:
    Code:
    import serial
    ser = serial.Serial(port = '/dev/ttymxc5', baudrate=9600)
    ser.close()
    ser.open()
    while ser.isOpen():
            x = ser.readline()
            print x
    ser.close()
    Should I be good to go now?
     
    Last edited: Jun 19, 2017
  4. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    Edit: Did not read well, you patched... :)

    Yes you are OK.
     
  5. Tengoles

    Tengoles New Member

    Joined:
    Nov 23, 2016
    Messages:
    14
    Likes Received:
    3
    Worked perfectly! thanks
     
    waltervl likes this.
  6. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    just to inform you that in Udoobunto 2.1.3, Release date 19-jun-2017 the patch for UART6 has been implemented.
    See also [SOLVED] I2C slow
     

Share This Page