Client programs on Rapsberry Pi did not stray too far from these two great tutorials: PiCamera Documentation - Advanced Recipes Ultrasonic Distance Measurement Using Python – Part 2