Updated sensor code and added display code