Home Forums EasyTransfer Library Support Forum Transfer strings

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3150
    Anonymous
    Inactive

    How do I transfer a string with this library? I have been trying with no sucess.

    Thanks,

    Rob Berry

    #3158
    Bill
    Member

    Short answer: Don’t do that.

    Strings in Arduino are a special type. In simple C strings are just arrays of characters, and you could transfer that. But it’s horribly inefficient. And the library has a limit of 255 bytes of data, or only 255 characters in a string.

    So if you really wanted, you would have to convert strings to arrays of characters before sending them via ET.

    But what are you really trying to do? Just send status messages?

    #3161
    Anonymous
    Inactive

    How do I calculate the size of my structure?

    If I have an 8-position integer array, a 16-position integer array, and an unsigned long integer, is that just 52 bytes (2×8 + 2×16 + 1×4), or is there additional overhead from the structure itself?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.