Serial Object Not Receiving Data from Arduino?
Hello! I've been trying out the Max tutorial patch for “Communication Tutorial 2: Serial Communication”, but have run into some issue. The patch appeared to work the first time, and it had data passing through, but not all of the incoming numbers matched the Arduino Serial Monitor output. Now I don't see any data coming out of the serial object at all.
I changed the serial object port to match the one my Arduino appears on when I send a “print” message to serial (it's c), but I don’t think I’ve modified the patch otherwise. Printing out the serial object status gives “read -1” most of the time and “write -1” when I send a number into serial. I haven't been able to find a reference explaining what the -1 means.
I tried starting Max on serial and then the Arduino, and also the other way around. Does the order matter?
I'm working with an Arduino Mega 2560 and Max 8.
Not sure if I'm making some rookie mistake in my approach. Any help would be much appreciated!
Max Serial object and Arduino Software should not talk to arduino board at same time.
If You use Max , quit Arduino Software , Plug the Board, start Max.
That fixed it. Thank you so much!
You are welcome.
If it is necessary to switch between Arduino IDE and Max to program / debug,
one can send close message to serial object.
That frees it and Arduino can upload code again.
But close Arduino serial monitor before initiating Max serial object
again using port message.