Raspberry Pi main client code