Discussion in 'Arduino IDE' started by simcode, Dec 3, 2013.
if i use Serial.println then stop process
Correction to my earlier post.
It's clear that if you pass an unsupported data type to Serial then it will hang the SAM3X8E. EG pass it a Float and it hangs. However the 'Serial' library is documented as supporting "any data type" (not sure they mean that literally, but for sure Strings and Floats are supposed to work out of the box). Clearly it doesn't.
Here is a workaround (for strings), use an array of chars with a Null terminator.
char myTestString [ ] = "Test raw char *\0";
but i don't run.
if i use Serial library then stop process
If you pass an unsupported data type to the Serial class it will result in a COMPILE error not a runtime error.
Well, all data types are supposed to be supported by Serial but there is clearly an issue at Compile stage that only exhibits at runtime.
A ticket has been created and Team UDOO are looking into this currently.
This is something related to the Arduino IDE compiler. We are working on it and we should solve the problem with an update in the near future.
Please see this post:
Separate names with a comma.