I would like to be able to initiate a bash script on a raspberry pi 3 that tells another raspberry pi to initiate its own bash script (to run sensors).

Here is my setup: I am communicating to the first rpi over an ad hoc network broadcast by the pi, and I ssh in. Then I start some python scripts. There is a second pi, to which I can communicate with in the same manner, but I would like the first pi to simply tell the second pi to begin its python script as well.

In essence I need to have the two pis talk to each other, preferably over a wired connection, but it could be over blue tooth or if I can get one pi to connect to the other pis ad hoc network upon boot-up.

aside: It would also be great if I could sync the clocks on the two pis to each other via the same communication method.

Does anyone have experience with this?

  • Research ntp for the time sync, and within your first Pi's script, you can initiate an SSH session to the second Pi to kick off the script there. That's probably the simplest way considering what you currently have. – stevieb Aug 22 '17 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.