Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending Array bytes #63

Closed
PadmaIoT opened this issue Jun 5, 2023 · 2 comments
Closed

Sending Array bytes #63

PadmaIoT opened this issue Jun 5, 2023 · 2 comments

Comments

@PadmaIoT
Copy link

PadmaIoT commented Jun 5, 2023

Hello,
Thanks for this library.
I want to send a byte array of 42 members in it. without using struct how can I send and receive the byte array? I am trying to simultaneously send & receive to & from 3 E32 device units(half duplex). Is it possible? If possible then how? Can you guide me? Please I will be obliged for your help.

@KrisKasprzak
Copy link
Owner

I've tried many methods in sending data w/o a struct and all methods ended up being unreliable. Not sure why you can't use a struct but I've found it to be the most reliable and easy to implement.

something like this

struct DATA {
byte data[42];
};

DATA Kris;

void setup() {
Serial.begin(9600);
while (!Serial){}
Kris.data[0] = 4;
Kris.data[1] = 6;
}

void loop() {
// here you send or listen to the EBYTE serial port
Serial.println(Kris.data[0]);
}

Regarding sending / receive multiple, it's not clear what you are trying to do. 1) send 1 to many 2) send many to one 3) other. I have a system where one sends to many, but I'm not sure if many can send to one.

Note these units only work in half duplex.

I'll need a bit more info to assist further.

@PadmaIoT
Copy link
Author

PadmaIoT commented Jun 26, 2023

Hello,
Thanks for your kind help.
My system is one to many.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants