Server code - takes photos, communicates with a slave