several nodes gatewayserial it's possible??(problem).
-
good day
I have this problem
I have a couple of nodes connected to the serial gateway (without a controller)
And the problem is that they cross the transmissions that they send me
(I need to have the measurements of the nodes separately)
the question is
It is possible to avoid the crossings of transmissions so that I get the data of node N first and then the next and so on.I hope you can help me with this doubt
It's for a school project
Thank you.
-
If i understand correctly you want your nodes to send in the data sequentially and not whenever they like ?
One way that i can think of would be to use a node to node message from the gateway to trigger the data send on the nodes. The only thing I am not sure of is if this is possible from a gateway but it will be easy enough for you to test and see.
-
The basic format for a node to node message looks like this
You would need to place a message send to each of your nodes in your gateways loop part of the sketch. then use a non blocking timer to control when the messages are sent.
on the nodes you will need to have code to respond to the message, it could be quite basic depending on what sensors etc you have on the node.
void receive(const MyMessage &message) { if (message.type == V_STATUS ) { // put code here to send data } }
-
@Boots33
Yes, thanks, that's what I want to do.
I'll prove it.
-
If you parse the received message on the gateway, you can have the node ID an thus you will have which sensor sent the data without too much effort, if I understood what you were saying
Suggested Topics
-
Update RF24 library to latest version
Bug Reports • 23 Mar 2014, 23:37 • andriej 24 Mar 2014, 22:52 -
What is actual status of MySensors?
General Discussion • 16 days ago • perfectom 8 days ago -
No merge into master in the last 5 years, should we use development?
General Discussion • 23 Sept 2024, 17:48 • kiesel 25 Mar 2025, 15:30 -
ESP-NOW
General Discussion • 22 Apr 2018, 05:58 • NeverDie 17 Feb 2025, 22:24 -
Is it possible to extract child ID from a just sent message?
General Discussion • 8 Nov 2021, 09:21 • Nigel31 27 days ago -
Email notifications received twice
General Discussion • 6 Feb 2023, 16:15 • Jodaille 27 Mar 2025, 06:07