Swith pedo view and sleep view sample code