Code outputs state of Hall Effect sensor to stdout