Light Chasing ------------- Follow the LED to proceed to the next state. .. image:: light_chasing.svg :align: center .. tab-set:: .. tab-item:: Python .. literalinclude:: ../../../../examples/light_chasing.py :language: python :start-at: from bpod_core. .. tab-item:: JSON .. code-block:: json { "states": { "Port1Active1": { "transitions": { "Port1_High": "Port2Active1" }, "actions": { "PWM1": 255 } }, "Port2Active1": { "transitions": { "Port2_High": "Port3Active1" }, "actions": { "PWM2": 255 } }, "Port3Active1": { "transitions": { "Port3_High": "Port1Active2" }, "actions": { "PWM3": 255 } }, "Port1Active2": { "transitions": { "Port1_High": "Port2Active2" }, "actions": { "PWM1": 255 } }, "Port2Active2": { "transitions": { "Port2_High": "Port3Active2" }, "actions": { "PWM2": 255 } }, "Port3Active2": { "transitions": { "Port3_High": ">exit" }, "actions": { "PWM3": 255 } } } } .. tab-item:: YAML .. code-block:: yaml states: Port1Active1: transitions: Port1_High: Port2Active1 actions: PWM1: 255 Port2Active1: transitions: Port2_High: Port3Active1 actions: PWM2: 255 Port3Active1: transitions: Port3_High: Port1Active2 actions: PWM3: 255 Port1Active2: transitions: Port1_High: Port2Active2 actions: PWM1: 255 Port2Active2: transitions: Port2_High: Port3Active2 actions: PWM2: 255 Port3Active2: transitions: Port3_High: '>exit' actions: PWM3: 255