As part of my thesis project, I am trying to read distance sensor data into Max. This seems like it should be so easy! I've been trying for over a week with no luck, and I really need to show some progress soon.
I have successfully connected the Ping to the Arduino; I know this is working properly. It gives accurate readings into the Arduino serial monitor. I did exactly this :: http://arduino.cc/en/Tutorial/Ping
...I even edited the code to print only integers representing inches. So I have the exact data I need, it's just in Arduino Serial Monitor and not in Max!
I've looked extensively at the Arduino2Max code + patch. I think the problem is that for the Ping, a digital write is required in order to transmit a signal for the sensor to use, and Arduino2Max doesn't facilitate this.
When the Ping is streaming data into the Arduino Serial Monitor, its LED blinks. When I close Arduino, the LED still blinks. However, when I open a Max patch with a serial object, it immediately stops blinking. I don't really understand why this would be happening. Is there any way to just avoid the serial object and tell Max just to copy what Arduino is already doing with the "serial.print"?
Anyway, I have been trying countless different ways to splice together Arduino sketches (I still don't entirely understand the language) so that Max can read the sensor data. I feel like there is a super easy solution that I'm just somehow overlooking. I would sincerely appreciate any help! Thanks!