message: refactor(api): move startup sequence logic from blinkenlights to API
  Adds activate_robot() function with startup sequence for GPIO. Calling this function is both necessary and sufficient to prepare required raspberry pi GPIO pins for operation.
diff: @@ -22,7 +22,7 @@ to set up all pins correctly, and then providing `set_low` and `set_high`
  functions that accept a pin number. The OUTPUT_PINS and INPUT_PINS dicts
  provide pin-mappings so calling code does not need to use raw integers.
  """
  -
  +import time
  IN = "in"
  OUT = "out"
  @@ -154,6 +154,27 @@ def initialize():
  _enable_pin(pin, IN)
  +def robot_startup_sequence():
  + """
  + Gets the robot ready for operation by initializing GPIO pins, resetting
  + the Smoothie and enabling the audio pin. This only needs to be done
  + after power cycling the machine.
  + """
  + initialize()
  +
  + # audio-enable pin can stay HIGH always, unless there is noise coming
  + # from the amplifier, then we can set to LOW to disable the amplifier
  + set_high(OUTPUT_PINS['AUDIO_ENABLE'])
  +
  + # smoothieware programming pins, must be in a known state (HIGH)
  + set_high(OUTPUT_PINS['HALT'])
  + set_high(OUTPUT_PINS['ISP'])
  + set_low(OUTPUT_PINS['RESET'])
  + time.sleep(0.25)
  + set_high(OUTPUT_PINS['RESET'])
  + time.sleep(0.25)
  +
  +
  def turn_on_blue_button_light():
  set_button_light(blue=True)
  