How to read/capture/echo serial Arduino output? SOLVED

Discussion in 'General Programming Discussion' started by francescomm, Dec 19, 2013.

  1. francescomm

    francescomm Member

    Joined:
    Dec 14, 2013
    Messages:
    80
    Likes Received:
    4
    Hi, everyone, I have written a sketch to perform almost any action it is instructed to, from serial.

    The script works fine on the serial monitor, it receives commands performs actions (turn leds on or to an analog value) reads results (a digital or analog pin value) and prints them out to serial.

    The sources are here:
    https://github.com/francescom/Pilot.ino

    I installed screen to debug it and it worked fine

    Code:
    sudo apt-get install screen
    and
    Code:
    screen /dev/ttymxc3 9600
    Now I would like to use it from Linux/Node/PHP etc allowing me to perform all these actions from any scripting language. I tried many ways with no success.


    Commands get sent to the Arduino and executed (leds dim) but no response is ever printed to console. Googling around, I tried in any way to create a command script to write to serial and read results with no success.

    <b>UPDATE: I managed to fix this, and updated the sources on GITHub</b>. I will start a new thread on interaction of this script with PHP.

    UDOO Rocks!
     
  2. francescomm

    francescomm Member

    Joined:
    Dec 14, 2013
    Messages:
    80
    Likes Received:
    4
    Re: How to get serial communication output? Help!!!

    Help, anyone? What script do you use to read the serial port? How do you setup the port (linux side)?
     

Share This Page