[PD] comport question....

Alexandre Castonguay acastonguay at artengine.ca
Tue Sep 14 17:36:13 CEST 2010


Try [bytes2any]? hc suggested it to me yesterday on the dataflow chat 
and it worked like a charm.

a

Rory Walsh a écrit :
> It's been a while since I've posted, I hope everyone is keeping well!
> I'm trying to retrieve data from a heart rate monitor with Pd using
> the comport object. Sending a 'G1' followed by a carriage return to
> the HRM device using a terminal emulator returns something like 32 10
> 61, where 61 is the current heart rate and 10 is the time passed since
> I first queried the heart rate. If I try to print this info in Pd ala:
>
> |comport|
> |
> |sprintf %c|
> |
> |print|
>
> I get something like this:
>
> 3
> 2
> 1
> 0
> 6
> 1
>
> Obviously this isn't much use to me. The data that is passed from the
> serial device is an 8 bit value but I've no idea how to parse it
> correctly. If I don't use sprintf I get the following print out:
>
> print: 51
> print: 32
> print: 49
> print: 48
> print: 50
> print: 32
> print: 48
> print: 32
> print: 13
>
> Any ideas or suggestions on how to parse the data being returned from
> the device?
>
> Rory.
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>
>   




More information about the Pd-list mailing list