• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Sabina_Labonc
    S
    • Profile
    • Following 1
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    Sabina_Labonc

    @Sabina_Labonc

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    1
    Following
    Joined Last Online

    Sabina_Labonc Unfollow Follow

    Latest posts made by Sabina_Labonc

    • UART port (TX, RX) communication between Uni Pi 1.1 and Arduino Uno

      Hello all,

      I'm trying to connect a device with Uni Pi via Uart port (TX, RX).
      I want to get information in Mervis from Arduino (some values from EC an pH sensors).
      I own Unipi 1.1 hardware, use Mervis 2.3 and the protocol wanted is serial communication between Unipi 1.1 as the slave and Arduino Uno master.

      I'm using a RJ11 connector from UART port on UniPi 1.1 to Arduino Uno:

      • UART port GND --> Arduino GND pin
      • UART port Rx --> Arduino Tx (pin 1)
      • UART port Tx --> Arduino Rx (pin 0)

      I've tried to open the port using:

      def := 'serial:6:9600,8,N,1';
        handle := io.openport(def);
        if handle >= 0 then
        state := 1;
        end_if;
      

      The state is updated to value "1" and then to value "2" after waiting for change of input value or timeout expiry after last values transmission - on case "1".
      But in case "2" I'm getting some port statuses like 31/53/77 after attempting to open the port:

      2:
      if io.getportstatus(handle) = 0 then (* OperationStatus_Ok ) ( spojeni navazano *)
      

      I tried different ports, with baud rate 9600 and second time with 115200 but I received the following errors:

      • on port 1: OperationStatus_Empty = 31
      • on ports 0, 2-9 and 20 - unknown error 77 (it's not in the list with possible return values)
      • on ports 10-19 - OperationStatus_FileNotFound = 53.

      Could you please advise on:

      • how to open that port / connect the serial port
      • what alternative do I have to make this communication between Arduino Uno and Uni Pi 1.1 to work
      • what is OpenPort?
      posted in Mervis
      S
      Sabina_Labonc