diff --git a/amp_controller.py b/amp_controller.py index 305d5f3..28a7d7f 100644 --- a/amp_controller.py +++ b/amp_controller.py @@ -80,7 +80,7 @@ class amp_controller: return False -if __name__ == "__main__": +def main(): ac = amp_controller() ac.setup_pins() ac.power("on") @@ -131,3 +131,7 @@ if __name__ == "__main__": timer = ac.SHUTOFF_TIMER_DURATION logging.debug("Something is playing.") logging.debug("Timer: " + str(timer)) + + +if __name__ == "__main__": + main()