How to read data printed by sketches? -solved

Discussion in 'Arduino IDE' started by Capstan, Feb 22, 2014.

  1. Capstan

    Capstan New Member

    Joined:
    Feb 14, 2014
    Messages:
    18
    Likes Received:
    0
    I'm running Linaro Ubuntu 12.04, I have graphical desktop up and running, and I can run the Arduino IDE there. I can write sketches and they get uploaded correctly and they run the blink test, no problem. The IDE says it is using /dev/ttymxc3. How can I read data from Linux that I print out from my sketches?

    I'm attempting to use Serial.println(), should the text show up on the IDE console? Where does it go and how to I read it? The Serial.available() method appears to succeed (the only way I can tell is by blinking an error if it would fail).
     
  2. Capstan

    Capstan New Member

    Joined:
    Feb 14, 2014
    Messages:
    18
    Likes Received:
    0
    Finally figured this out - it was a problem with inexperience. :)

    In the Arduino IDE there is a "tools->serial monitor" which invokes a separate window where you can see data printed from the Arduino and type in text to send. The messages I print from a sketch do appear there. I was also able to see the data by using minicom from /dev/ttyS0.

    And so beyond that, I was trying to understand how to read the the serial data from within a separate program - specifically, a program written in node.js. I found a solution here;
    http://stackoverflow.com/questions/1684 ... aspberrypi
     

Share This Page