help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arduino/Serial Listening


From: Juan Pablo Carbajal
Subject: Re: Arduino/Serial Listening
Date: Sat, 27 Aug 2016 21:12:08 +0200

On Fri, Aug 26, 2016 at 4:16 PM, lachycharts <address@hidden> wrote:
> I am using Octave to communicate with my Arduino using the instrument-control
> package. Right now, I send a G-code string to move the motor, and it will
> report back to octave with how many steps it has moved every 100ms. My goal
> is to set up a listening function that's sole purpose is to keep looping and
> checking the Arudino output /in the background without freezing the whole
> program/. I've done this using threading in C++ (Qt) but with Octave I have
> to enter a while-loop and break out of it when I reach my delimiting
> character 'D' for "Done". I'd like to be able to read the serial port buffer
> and perform other processes/functions/commands in Octave in the mean time.
>
> Is this possible?
>
> Lachlan
>
>
>
> --
> View this message in context: 
> http://octave.1599824.n4.nabble.com/Arduino-Serial-Listening-tp4679487.html
> Sent from the Octave - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-octave

Did you already try setting the value of timeout when creating the
serial object?
You can fake a multi-thread doing a while loop and calling srl_read
with timeout at the beginning and then do other stuff.

check the function fork and the package zeromq for real threads...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]