Results 1 to 4 of 4

Thread: Make Analog Input Trigger RR Play

  1. #1
    Variable Bitrate
    Join Date
    Aug 2006
    Location
    Central PA
    Posts
    246

    Make Analog Input Trigger RR Play

    I have the test com event setup that you made for us in the other thread. What I want to do is add an analog input that will trigger Road Runner to play. Once I have an example I should be able to do the rest on my own.


    My config looks like this:

    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <FusionControlCentreConfiguration version="3.0" author="Ninja Kitty Wizard of Doom" date_created="Wednesday, December 10, 2008 at 7:42:35 PM" last_modified="Wednesday, December 10, 2008 at 7:43:34 PM">
    
      <require>
      <!-- Begin Function Instances -->
      <!-- End Function Instances -->
    
      <!-- Begin Fusion Font Instances -->
      <!-- End Fusion Font Instances -->
      </require>
    
      <speech enabled="false" global_politeness="true">
      <!-- Begin System Speech Instances -->
      <!-- End System Speech Instances -->
    
      <!-- Begin System Speech Definition Instances -->
          <system_definitions>
          </system_definitions>
      <!-- End System Speech Definition Instances -->
    
      <!-- Begin Custom Speech Definition Instances -->
          <custom_definitions>
          </custom_definitions>
      <!-- End Custom Speech Definition Instances -->
    
      <!-- Begin Custom Query Instances -->
          <custom_queries>
          </custom_queries>
      <!-- End Custom Query Instances -->
      </speech>
    
      <general>
    
    
        <com status="enabled">
          <commands>
            <command id="RoadRunnerCommand" minimum_delta_vote_time="100">
              <do function="trigger output" functionTargetID="Digital Output 0" vote_opinion="on" vote_priority="medium"></do>
              <do function="trigger output" functionTargetID="Digital Output 1" vote_opinion="on" vote_priority="medium"></do>
            </command>
          </commands>
          <executable_commands>
            <external_COM_id id="RoadRunner.SDK">
              <command internal_id="RoadRunnerCommand_PLAY" external_command="Execute">
                <parameter order="0" external_command_parameter="PLAY" />
              </command>
            </external_COM_id>
          </executable_commands>
        </com>
    
      <!-- Begin Remote Control Configuration -->
        <remote status="disabled" user_name="default" port="4242"></remote>
      <!-- End Remote Control Configuration -->
      </general>
    
      <graphics>
      <!-- Begin Global Graphic Settings -->
          <main_display designed_for_size="800,600" show_at_size="800,600" menubar="Sizeable" RunInSystemTray="False" MinimizeToSystemTray="True"></main_display>
      <!-- End Global Graphic Settings -->
    
      <!-- Begin Background Images -->
          <background_image style="stretch" imagefilepath="content\images\background_images\background.jpg" page="0"></background_image>
      <!-- End Background Images -->
    
      <!-- Begin Static Images -->
          <staticimage>
            <image path="content\images\static_images\logo.png"></image>
            <display size="556,27" location="123,44" page="0" z_order="0.9"></display>
          </staticimage>
      <!-- End Static Images -->
    
      <!-- Begin Variable Location Images -->
      <!-- End Variable Location Images -->
    
      <!-- Begin Graph Instances -->
      <!-- End Graph Instances -->
    
      <!-- Begin Display Buttons -->
        
    	<button id="BUTTON_COM_TEST" enabled="yes" function="external command" functionTargetID="roadrunnercommand_play" vote="filler" vote_opinion="filler" vote_priority="Medium">
            <images imagePrimary="content\images\button_images\button_down.png" imageSecondary="content\images\button_images\button.png" imageDisabled="content\images\button_images\button.png" imagePushed="content\images\button_images\button_down.png"></images>
            <display size="230,70" location="37,119" page="0" z_order="0.9"></display>
            <vote_options minimum_delta_vote_time_down="20" ></vote_options>
            <text font="verdana" font_size="25"></text>
            <text colourPrimaryARGB="255,255,255,255" textPrimary="COM_Test"></text>
            <text colourSecondaryARGB="255,255,255,255" textSecondary="COM_Test"></text>
          </button>
    
      <!-- End Display Buttons -->
    
      <!-- Begin Multi Images -->
      <!-- End Multi Images -->
    
      <!-- Begin Text Labels -->
      <!-- End Text Labels -->
      </graphics>
    
      <io>
      <!-- Begin Fusion Brain Instances -->
          <brain id="My Fusion Brain 0">0</brain>
      <!-- End Fusion Brain Instances -->
    
      <!-- Begin Timer Setup -->
          <timer id="input" interval="75"></timer>
          <timer id="output" interval="100"></timer>
          <timer id="gui" interval="50"></timer>
          <timer id="logic" interval="50"></timer>
      <!-- End Timer Setup -->
    
      <!-- Begin Digital Output Instances -->
          <iochannel id="Digital Output 0" port="0" brain="My Fusion Brain 0" type="digital_output">
            <defaults defaultstate="off"></defaults>
          </iochannel>
      <!-- End Digital Output Instances -->
    
      <!-- Begin Analogue Input Instances -->
      <!-- End Analogue Input Instances -->
      </io>
    
      <logic>
      <!-- Begin Logging Setup -->
        <all_logging>
        </all_logging>
      <!-- End Logging Setup -->
    
      <!-- Begin Variable Declarations -->
        <all_variables>
        </all_variables>
      <!-- End Variable Declarations -->
    
      <!-- Begin Logic Declarations -->
        <all_statements>
        </all_statements>
      <!-- End Logic Declarations -->
      </logic>
    </FusionControlCentreConfiguration>

  2. #2
    Constant Bitrate stealinfool's Avatar
    Join Date
    Dec 2005
    Location
    Orlando
    Posts
    142
    I'm going to give you both parts of my xml file for completeness. You can delete out what you don't want.

    COM section:
    Code:
    <com status="enabled">
          <executable_commands>
            <external_COM_id id="RoadRunner.SDK">
    
              <command internal_id="RoadRunnerCommand_PLAY" external_command="Execute">
                <parameter order="0" external_command_parameter="PLAY" />
              </command>
              <command internal_id="RoadRunnerCommand_NEXT" external_command="Execute">
                <parameter order="0" external_command_parameter="NEXT" />
              </command>
             <command internal_id="RoadRunnerCommand_PREV" external_command="Execute">
                <parameter order="0" external_command_parameter="PREV" />
              </command>
    	<command internal_id="RoadRunnerCommand_VOL+" external_command="Execute">
                <parameter order="0" external_command_parameter="VOL+" />
              </command>
    
    	<command internal_id="RoadRunnerCommand_VOL-" external_command="Execute">
                <parameter order="0" external_command_parameter="VOL-" />
              </command>
          
            </external_COM_id>
    Logic Section:

    Code:
    <logic>
      <!-- Begin Logging Setup -->
        <all_logging>
        </all_logging>
      <!-- End Logging Setup -->
    
      <!-- Begin Variable Declarations -->
        <all_variables>
          <variable name="variable_swc1">0</variable>
          <variable name="variable_swc2">0</variable>
        </all_variables>
      <!-- End Variable Declarations -->
    
      <!-- Begin Logic Declarations -->
        <all_statements>
          <if fire_on="logic" minimum_delta_vote_time="100" id="Logic for SWC1">
            <variable do="set" name="Variable_SWC1">
                <analogue id="SWC1" time="0"></analogue>
            </variable>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="100" id="Logic for SWC2">
            <variable do="set" name="Variable_SWC2">
                <analogue id="SWC2" time="0"></analogue>
            </variable>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="100" id="SW Vol UP Logic">
            <boolean_operation type="between ii">
              <parameter1>
                <number>0.83</number>
              </parameter1>
              <parameter2>
                <analogue id="SWC1" time="0"></analogue>
              </parameter2>
              <parameter3>
                <number>0.90</number>
              </parameter3>
            </boolean_operation>
            <then>
              <do function="external command" functionTargetID="RoadRunnerCommand_VOL+" vote_opinion="VOL+" vote_priority="Medium"></do>
            </then>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="100" id="SW Vol DOWN Logic">
            <boolean_operation type="between ii">
              <parameter1>
                <number>2.0</number>
              </parameter1>
              <parameter2>
                <analogue id="SWC1" time="0"></analogue>
              </parameter2>
              <parameter3>
                <number>2.09</number>
              </parameter3>
            </boolean_operation>
            <then>
              <do function="external command" functionTargetID="RoadRunnerCommand_VOL-" vote_opinion="VOL-" vote_priority="Medium"></do>
            </then>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="500" id="SW Track Next Logic">
            <boolean_operation type="between ii">
              <parameter1>
                <number>0.01</number>
              </parameter1>
              <parameter2>
                <analogue id="SWC1" time="0"></analogue>
              </parameter2>
              <parameter3>
                <number>0.37</number>
              </parameter3>
            </boolean_operation>
            <then>
              <do function="external command" functionTargetID="RoadRunnerCommand_NEXT" vote_opinion="NEXT" vote_priority="Medium"></do>
            </then>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="500" id="SW Track Prev Logic">
            <boolean_operation type="between ii">
              <parameter1>
                <number>0.38</number>
              </parameter1>
              <parameter2>
                <analogue id="SWC1" time="0"></analogue>
              </parameter2>
              <parameter3>
                <number>0.40</number>
              </parameter3>
            </boolean_operation>
            <then>
              <do function="external command" functionTargetID="RoadRunnerCommand_PREV" vote_opinion="PREV" vote_priority="Medium"></do>
            </then>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="1000" id="SW MODE PLAY PAUSE #">
            <boolean_operation type="between ii">
              <parameter1>
                <number>0.01</number>
              </parameter1>
              <parameter2>
                <analogue id="SWC2" time="0"></analogue>
              </parameter2>
              <parameter3>
                <number>2.25</number>
              </parameter3>
            </boolean_operation>
            <then>
              <do function="external command" functionTargetID="RoadRunnerCommand_Play" vote_opinion="PLAY" vote_priority="Medium"></do>
            </then>
          </if>
        </all_statements>
      <!-- End Logic Declarations -->
      </logic>
    This all works. You will obviously need to subsitute your own values.
    Do not be alarmed when the configurator gives you an error. IT WILL OVERWRITE YOUR EXTERNAL COMMANDS. Or, at least mine does. Make sure you double check that it hasn't overwritten your stuff.

    Hope this helps.

  3. #3
    Variable Bitrate
    Join Date
    Aug 2006
    Location
    Central PA
    Posts
    246
    Thanks for the post. I'm having issues... Could you just post your entire config? I may be able to just use yours and modify it.

    Edit:

    I think I found the problem. Was missing </executable_commands> </com>.

    Edit 2:

    Got it! Thanks!

  4. #4
    Constant Bitrate stealinfool's Avatar
    Join Date
    Dec 2005
    Location
    Orlando
    Posts
    142
    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <FusionControlCentreConfiguration version="3.0" author="your mother" date_created="Thursday, December 04, 2008 at 10:24:13 PM" last_modified="Friday, December 05, 2008 at 2:33:57 PM">
    
      <require>
      <!-- Begin Function Instances -->
      <!-- End Function Instances -->
    
      <!-- Begin Fusion Font Instances -->
          <font name="Verdana" originalSize="25" font_config="content\fonts\Verdana.xml"></font>
      <!-- End Fusion Font Instances -->
      </require>
    
      <speech enabled="false" global_politeness="true">
      <!-- Begin System Speech Instances -->
      <!-- End System Speech Instances -->
    
      <!-- Begin System Speech Definition Instances -->
          <system_definitions>
          </system_definitions>
      <!-- End System Speech Definition Instances -->
    
      <!-- Begin Custom Speech Definition Instances -->
          <custom_definitions>
          </custom_definitions>
      <!-- End Custom Speech Definition Instances -->
    
      <!-- Begin Custom Query Instances -->
          <custom_queries>
          </custom_queries>
      <!-- End Custom Query Instances -->
      </speech>
    
      <general>
    <!-- Begin Debug Instances -->
        <debug status="off">
          <window type="variables"></window>
          <window type="ifthen"></window>
          <virtual_brain id="my fusion brain 0"></virtual_brain>
        </debug>
      <!-- End Debug Instances -->
    
    <com status="enabled">
          <executable_commands>
            <external_COM_id id="RoadRunner.SDK">
    
              <command internal_id="RoadRunnerCommand_PLAY" external_command="Execute">
                <parameter order="0" external_command_parameter="PLAY" />
              </command>
              <command internal_id="RoadRunnerCommand_NEXT" external_command="Execute">
                <parameter order="0" external_command_parameter="NEXT" />
              </command>
             <command internal_id="RoadRunnerCommand_PREV" external_command="Execute">
                <parameter order="0" external_command_parameter="PREV" />
              </command>
    	<command internal_id="RoadRunnerCommand_VOL+" external_command="Execute">
                <parameter order="0" external_command_parameter="VOL+" />
              </command>
    
    	<command internal_id="RoadRunnerCommand_VOL-" external_command="Execute">
                <parameter order="0" external_command_parameter="VOL-" />
              </command>
          
            </external_COM_id>
          </executable_commands>
      </com>
      <!-- Begin Remote Control Configuration -->
        <remote status="disabled" user_name="default" port="4242"></remote>
      <!-- End Remote Control Configuration -->
      </general>
    
      <graphics>
      <!-- Begin Global Graphic Settings -->
          <main_display designed_for_size="800,600" show_at_size="800,600" menubar="sizeable" RunInSystemTray="True" MinimizeToSystemTray="True"></main_display>
      <!-- End Global Graphic Settings -->
    
      <!-- Begin Background Images -->
          <background_image style="stretch" imagefilepath="content\images\background_images\background.jpg" page="0"></background_image>
      <!-- End Background Images -->
    
      <!-- Begin Static Images -->
          <staticimage>
            <image path="content\images\static_images\button_larger.png"></image>
            <display size="355,70" location="37,119" page="0" z_order="0.9"></display>
          </staticimage>
          <staticimage>
            <image path="content\images\static_images\button_larger.png"></image>
            <display size="355,70" location="412,119" page="0" z_order="0.9"></display>
          </staticimage>
          <staticimage>
            <image path="content\images\static_images\logo.png"></image>
            <display size="556,27" location="123,44" page="0" z_order="0.9"></display>
          </staticimage>
      <!-- End Static Images -->
    
      <!-- Begin Variable Location Images -->
      <!-- End Variable Location Images -->
    
      <!-- Begin Graph Instances -->
      <!-- End Graph Instances -->
    
      <!-- Begin Display Buttons -->
      <!-- End Display Buttons -->
    
      <!-- Begin Multi Images -->
      <!-- End Multi Images -->
    
      <!-- Begin Text Labels -->
          <text_label id="Text_Label_SWC1" text="SWC1: " auto_monitor="variable" auto_monitorTarget="variable_swc1">
            <font font_id="verdana" font_size="25" colour="255,255,255,255"></font>
            <display location="37,119" page="0"></display>
            <config decimals="2" max_size="355,70"></config>
          </text_label>
          <text_label id="Text_Label_SWC2" text="SWC2: " auto_monitor="variable" auto_monitorTarget="variable_swc2">
            <font font_id="verdana" font_size="25" colour="255,255,255,255"></font>
            <display location="412,119" page="0"></display>
            <config decimals="2" max_size="355,70"></config>
          </text_label>
      <!-- End Text Labels -->
      </graphics>
    
      <io>
      <!-- Begin Fusion Brain Instances -->
          <brain id="My Fusion Brain 0">brain id 0</brain>
      <!-- End Fusion Brain Instances -->
    
      <!-- Begin Timer Setup -->
          <timer id="input" interval="30"></timer>
          <timer id="output" interval="30"></timer>
          <timer id="gui" interval="30"></timer>
          <timer id="logic" interval="30"></timer>
      <!-- End Timer Setup -->
    
      <!-- Begin Digital Output Instances -->
      <!-- End Digital Output Instances -->
    
      <!-- Begin Analogue Input Instances -->
          <iochannel id="SWC1" port="0" brain="my fusion brain 0" type="analogue_input">
            <options history="5" auto_average="true"></options>
          </iochannel>
          <iochannel id="SWC2" port="1" brain="my fusion brain 0" type="analogue_input">
            <options history="5" auto_average="true"></options>
          </iochannel>
      <!-- End Analogue Input Instances -->
      </io>
    
      <logic>
      <!-- Begin Logging Setup -->
        <all_logging>
        </all_logging>
      <!-- End Logging Setup -->
    
      <!-- Begin Variable Declarations -->
        <all_variables>
          <variable name="variable_swc1">0</variable>
          <variable name="variable_swc2">0</variable>
        </all_variables>
      <!-- End Variable Declarations -->
    
      <!-- Begin Logic Declarations -->
        <all_statements>
          <if fire_on="logic" minimum_delta_vote_time="100" id="Logic for SWC1">
            <variable do="set" name="Variable_SWC1">
                <analogue id="SWC1" time="0"></analogue>
            </variable>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="100" id="Logic for SWC2">
            <variable do="set" name="Variable_SWC2">
                <analogue id="SWC2" time="0"></analogue>
            </variable>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="100" id="SW Vol UP Logic">
            <boolean_operation type="between ii">
              <parameter1>
                <number>0.83</number>
              </parameter1>
              <parameter2>
                <analogue id="SWC1" time="0"></analogue>
              </parameter2>
              <parameter3>
                <number>0.90</number>
              </parameter3>
            </boolean_operation>
            <then>
              <do function="external command" functionTargetID="RoadRunnerCommand_VOL+" vote_opinion="VOL+" vote_priority="Medium"></do>
            </then>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="100" id="SW Vol DOWN Logic">
            <boolean_operation type="between ii">
              <parameter1>
                <number>2.0</number>
              </parameter1>
              <parameter2>
                <analogue id="SWC1" time="0"></analogue>
              </parameter2>
              <parameter3>
                <number>2.09</number>
              </parameter3>
            </boolean_operation>
            <then>
              <do function="external command" functionTargetID="RoadRunnerCommand_VOL-" vote_opinion="VOL-" vote_priority="Medium"></do>
            </then>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="500" id="SW Track Next Logic">
            <boolean_operation type="between ii">
              <parameter1>
                <number>0.01</number>
              </parameter1>
              <parameter2>
                <analogue id="SWC1" time="0"></analogue>
              </parameter2>
              <parameter3>
                <number>0.37</number>
              </parameter3>
            </boolean_operation>
            <then>
              <do function="external command" functionTargetID="RoadRunnerCommand_NEXT" vote_opinion="NEXT" vote_priority="Medium"></do>
            </then>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="500" id="SW Track Prev Logic">
            <boolean_operation type="between ii">
              <parameter1>
                <number>0.38</number>
              </parameter1>
              <parameter2>
                <analogue id="SWC1" time="0"></analogue>
              </parameter2>
              <parameter3>
                <number>0.40</number>
              </parameter3>
            </boolean_operation>
            <then>
              <do function="external command" functionTargetID="RoadRunnerCommand_PREV" vote_opinion="PREV" vote_priority="Medium"></do>
            </then>
          </if>
          <if fire_on="logic" minimum_delta_vote_time="1000" id="SW MODE PLAY PAUSE #">
            <boolean_operation type="between ii">
              <parameter1>
                <number>0.01</number>
              </parameter1>
              <parameter2>
                <analogue id="SWC2" time="0"></analogue>
              </parameter2>
              <parameter3>
                <number>2.25</number>
              </parameter3>
            </boolean_operation>
            <then>
              <do function="external command" functionTargetID="RoadRunnerCommand_Play" vote_opinion="PLAY" vote_priority="Medium"></do>
            </then>
          </if>
        </all_statements>
      <!-- End Logic Declarations -->
      </logic>
    </FusionControlCentreConfiguration>

Similar Threads

  1. How make RR on top of IG?
    By civic5zigen in forum RR Skins
    Replies: 15
    Last Post: 11-19-2005, 07:47 PM
  2. How to make RR start with Windows?? plz advise
    By turbosx in forum Road Runner
    Replies: 19
    Last Post: 07-17-2005, 01:48 PM
  3. Replies: 1
    Last Post: 07-15-2005, 12:12 PM
  4. some song titles make rr hang
    By bigaaron in forum RR Bug Tracker
    Replies: 3
    Last Post: 04-16-2005, 07:48 AM
  5. Replies: 3
    Last Post: 04-12-2005, 09:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •