[Csnd] serialRead one value only?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] serialRead one value only?

luis antunes pena-4

Hi all,

I'm working with a camera that sends data via serial port - a very cool project called OpenMV Cam. And I was wondering if there is a possibility to get two or more values out of serialRead ? As far as I can see from the manual, this opcode can only read one value.

Best,

LuisĀ 

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] serialRead one value only?

Victor Lazzarini-2
Looking at the documentation, I suppose you have one data stream for each open
serial port. So if you want to open for instance the bluetooth and the usb ports,
you use two instances of serialBegin and with the separate handles, read the
data.

========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 8 Jun 2018, at 10:46, luis antunes pena <[hidden email]> wrote:
>
> Hi all,
>
> I'm working with a camera that sends data via serial port - a very cool project called OpenMV Cam. And I was wondering if there is a possibility to get two or more values out of serialRead ? As far as I can see from the manual, this opcode can only read one value.
> Best,
>
> Luis  
> --
> http://luisantunespena.eu
> http://sumtone.com
> Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list
[hidden email]
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] serialRead one value only?

zappfinger
In reply to this post by luis antunes pena-4

As an alternative, maybe you can use Python to read the serial port with pyserial. It has a lot of options.
This could be done by a Python program and then pass the data to csound, or maybe even using python 'inside' csound...

Richard

On 08/06/18 11:46, luis antunes pena wrote:

Hi all,

I'm working with a camera that sends data via serial port - a very cool project called OpenMV Cam. And I was wondering if there is a possibility to get two or more values out of serialRead ? As far as I can see from the manual, this opcode can only read one value.

Best,

LuisĀ 

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here