Hello,
I'm in the middle of a window shade centralized control system and I'm wondering if I can have 10 slaves with one master for wireless transmission.
Here's my project:
-1 master made out of an arduino Mega, a touch screen and an nRF24l01 module where you can choose between 10 windows or select them all and send an "up" or "down" command.
-10 slaves (one on each window) each made out of an arduino pro mini 2 relays and 3 buttons which can be activated remotely with it's nRF24l01 module or with the push buttons.
I want that when I select a window on the master and send a command, after the command is sent and the shade went up or down the slave send a message back saying that the new position is up or down... so that the logo on the screen can be updated to an open or closed window.
I also want that if I manually control a shade with the slave's push button, after it's done moving, it will send a message to the master saying in wich position it is so that the master can update the logo on the screen
I started to code everything and it's working fine with two slaves I used one different pipe for each slaves, but I just realized while reading through the forum that I'm limited to 6 pipes and I would have needed 10 pipes.
Is there a way for the master to be listening at 10 pipes ?
Otherwise I was thinking about "coding" my command
every receiver would be on the same pipe so they would all receive the command
I would have something like
dataToSend = 100 or 101 or 102 or 201; 202; 203.....
and on receiver1 an if fonction only doing something if dataReceived = 100 or 101 or 102
on receiver2 an if fonction only doing something if dataReceived = 200 or 201 or 202....
and it would send back 110; 111; 112 for slave1 / 210; 211; 212 for slave2 ...
and an if function in the master would sort everything and know that if the message is 110 or 111 or 112 it's from slave1 if the message is 210 or 211 or 212 it's from slave2...
But I don't really like this solution where everybody would be talking on the same pipe.
Don't know if that's really clear...
If anyone have a better idea I'm all ears.
Note that I didn't post my code for now since all the parts for the touch screen would be confusing and it's working for now with 2 slaves.
Thanks
Pierre