Skip to content

Advanced examples #18

@mfxpyro1

Description

@mfxpyro1

Hi, thanks for this Library, would it be possible to create some more advanced examples showing how to send multiple byte/different types of data? For example I want to send the data contained in this this and obviously receive it at the other end :-

struct dataStruct{unsigned long Packet; int Accel; int Brake; int Steer; byte SwA; byte SwB; byte SwC; byte SwD;}myData;

I've tried :-

        icsc.send('B',(uint8_t)myData, sizeof(myData));

But get the error :-

"invalid cast from type 'dataStruct' to type 'uint8_t {aka unsigned char}'"

and :-

        icsc.send('B',myData, sizeof(myData));

But get the error :-

"no matching function for call to 'ICSC::send(char, dataStruct&, unsigned int)'"

Structs are fairly new to me so wondering how to handle this? And I haven't even started looking at what to do at the receiving end yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions