I am totally new to Pi and networking in general and have no clue where to look for guides.
I need to build a system in which one master Pi controls several slave Pis. And those slave Pis are sending real-time data back to master Pi from sensor readings. The master Pi and slave Pis are likely to be connected over a dedicated network (wireless).
1) Switches are connected to the master and when a switch is turned on, it should automatically send some commands to a slave Pi (like to tell it to light up a LED connected to one of its GPIO pins). How can I do that? The idea in my head is to have master Pi SSH into that particular slave Pi but how do I automate the process of sending a prefixed command when triggered by a switch?
2) What methods/protocols should I use to send and receive real-time data from sensor readings of slave Pis? How do I do that? Will I need SFTP/SCP/SSHFS/FTP etc?
3) These 2 processes described above need to be applied to all slave Pis. Am I able to simultaneously do these on all slave Pis from the master Pi? Or do I have to switch from controlling one slave Pi to another? How do I do that?
Thank you :)