In anticipation of a couple Robotics Kits being delivered this next week. I got to thinking that I would love to have a set up that code written and saved could be put on both pi-tops to keep the code the same whether it is new code written or update to code (and save time transferring the code manually or writing it twice).
I’ve included a diagram of what I’ve come up with, in case anyone else finds it useful.
I’ve installed an open source software called Syncthing (syncthing.net) on all devices (both pi-tops, an optional RPi and the desktop/laptop that code will be written/saved on). With devices connected to one another – laptop to the RPi (for backups) and the the RPi connected to both pi-tops – code is written/updated and then saved to a shared folder and all devices automatically sync. Sync doesn’t matter where the code originates (on one of the pi-tops, on the RPi or the laptop, all devices stay in sync).
You can eliminate the middle RPi and just sync between the laptop and pi-tops (and you’re not just limited to two pi-tops… so great for a classroom setting). However, I like having the RPi in the middle that backs up the code because if I introduce another pi-top, all I have to do is sync it with that connection which takes less time, etc.
Check out the PiMyLifeUp website for a great article on how to install Syncthing: https://pimylifeup.com/raspberry-pi-syncthing/