Hi,
I have successfully got serial data from an ardunio and HC-SR04 distance meter running into COSM.
The issue I’m facing is when I check the ‘server log’ in the ‘code’ window, I see the following data. My computer serial monitor retuurns the correct serial values with proper formatting, however when I check the ‘server log’ in the ‘code’ window, I see this;
4/26/2013 2:15:14 AM: 2
4/26/2013 2:15:14 AM: 7
4/26/2013 2:15:14 AM: 6
4/26/2013 2:15:14 AM: 2
4/26/2013 2:15:14 AM: 7
4/26/2013 2:15:14 AM: 6
4/26/2013 2:15:15 AM: 2
4/26/2013 2:15:15 AM: 7
4/26/2013 2:15:15 AM: 5
When what I would like to be seeing is; (copied from Arduino IDE serial monitor);
Note:
276
276
276
276
277
276
276
277
276
286
What’s strange however is that the ‘Show Input’ node in the planner (which is linked to the correct output node) is returning values of;
50
54
55
53
54
55
These values are then being sent to COSM.
When I put my hand over the ultrasonic sensor the ‘Show Input Values’ drop to values like these;
43
47
45
42
The IMP code I’m using is listed in this tutorial. https://www.sparkfun.com/tutorials/397
Any hints as to what I should modify?
How can I format the data appropriately.
I.e 11234 instead of
1
1
2
3
4
For reference, my ultimate goal is to have, as realtime as possible, a live stream of distance data feeding into COSM and then read by Max/Msp. I’f I can get the formatting right, then everything else is a doddle.
Many thanks.