Added basic sensor polling code