Basic code for TPS camera