Navigation

    • Register
    • Login
    • Search
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. mrmuszynski
    3. Topics
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by mrmuszynski

    • mrmuszynski

      Concatenated String Doesn't Send Correctly
      My Project • • mrmuszynski  

      2
      0
      Votes
      2
      Posts
      33
      Views

      virtualmkr

      @mrmuszynski Hi, there are some setters for message payload types but none for type String, see: Message manipulation. You need to convert the resulting String into const char* like this: send(msg.set(("string " + String(expectedScratchpadValues)).c_str())); But in general I would try to avoid usage of the String data type, especially for the use case in your code example. You could use e.g.: char str[80]; sprintf(str, "string %d", expectedScratchpadValues); send(msg.set(str)); For Arduino String read more e.g. here: The Evils of Arduino Strings HTH
    • mrmuszynski

      Novice user with serial gateway issues!
      Troubleshooting • • mrmuszynski  

      11
      0
      Votes
      11
      Posts
      76
      Views

      zboblamont

      @skywatch Just to add to your points on 254 max children, definitions, presentation, etc., which may help @mrmuszynski at some stage. I've an array in a sketch with 14 DS18B20 addresses, all paged in turn using the one wire protocol on a single pin, so it is entirely possible to hit the 254 children limit before looking at I2C devices. The beauty of the DS18B20 array is individual chips are "defined" sequentially, hence making presentation and fetching values available to a FOR loop, which makes for a highly compact sketch.