if i use Serial.println then stop process

Discussion in 'Arduino IDE' started by simcode, Dec 3, 2013.

  1. simcode

    simcode New Member

    Joined:
    Dec 2, 2013
    Messages:
    8
    Likes Received:
    0
    if i use Serial.println then stop process

    why?
     
  2. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    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";
    Serial.println(myTestString);
     
  3. simcode

    simcode New Member

    Joined:
    Dec 2, 2013
    Messages:
    8
    Likes Received:
    0
    thank you.

    but i don't run.

    if i use Serial library then stop process
     
  4. jdonavan

    jdonavan New Member

    Joined:
    Oct 28, 2013
    Messages:
    34
    Likes Received:
    0
    If you pass an unsupported data type to the Serial class it will result in a COMPILE error not a runtime error.
     
  5. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    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.
     
  6. andcmp

    andcmp New Member

    Joined:
    May 8, 2013
    Messages:
    161
    Likes Received:
    0
    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.
     
  7. taylo1g

    taylo1g New Member

    Joined:
    Oct 30, 2013
    Messages:
    8
    Likes Received:
    1

Share This Page