factored out turning the LED on/off into hardware.c