[PD] comport question....
Rory Walsh
rorywalsh at ear.ie
Tue Sep 14 17:19:33 CEST 2010
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.
More information about the Pd-list
mailing list