Looks like the String class is bad too...

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

  1. jdonavan

    jdonavan New Member

    Joined:
    Oct 28, 2013
    Messages:
    34
    Likes Received:
    0
    Below is a REALLY simple script. At first I thought it demonstrated how the Serial class was borked for most data types. Then I realized it demonstrates just creating a String variable causes the Arduino to lock up:

    Code:
    //String testString("Test string class");
    void setup() {
      Serial.begin(9600);
    
    }
    
    void loop() {
      Serial.println("Test raw char *");
      //Serial.print(testString);
      delay(1000);
    }
     
  2. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Correction to my earlier post.

    It's 'Serial' rather than 'String' that seems to have issues. 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. Use an array of chars with a Null terminator.

    char myTestString [ ] = "Test raw char *\0";
    Serial.println(myTestString);
     
  3. jdonavan

    jdonavan New Member

    Joined:
    Oct 28, 2013
    Messages:
    34
    Likes Received:
    0
    Oh no. Serial has issues with sending anything other than ints and char*. You can't even CREATE an instance of the String class as well.

    At this point I'm REALLY curious about the QA proceedures being employed by the Udoo team.
     
  4. delba

    delba Administrator Staff Member

    Joined:
    May 8, 2013
    Messages:
    1,064
    Likes Received:
    9
    jdonavan, no need for that! We appreciate all the issues our users will find using UDOO so we can improve the product. We're working to fix the problem and we'll release the new IDE asap.
     

Share This Page