Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Help with resistive button UberMDX configuration

  1. #1
    Newbie
    Join Date
    Apr 2008
    Posts
    6

    Help with resistive button UberMDX configuration

    I have four resistive buttons hooked up to a voltage divider. They output voltages of 1.6, 2.2, 2.9, and 3.6 V, respectively. I've verified that the fusion brain correctly reads the buttons using the debug window.

    I'm trying to get these buttons to control functions in winamp. I don't know what I'm doing wrong; everything seems as if it should work, but nothing happens.

    Here is my FusionConfiguration.xml

    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <FusionControlCentreConfiguration version="3.0.0.0" author="" date_created="Tuesday, 
    
    April 22, 2008 at 6:04:05 PM" last_modified="Tuesday, April 22, 2008 at 6:04:22 PM">
    
      <require>
      <!-- Begin Function Instances -->
      <!-- End Function Instances -->
      </require>
    
      <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 -->
      <!-- End Background Images -->
    
      <!-- Begin Static Images -->
      <!-- End Static Images -->
    
      <!-- Begin Display Buttons -->
      <!-- End Display Buttons -->
    
      <!-- Begin Multi Images -->
      <!-- End Display Buttons -->
      </graphics>
    
      <io>
      <!-- Begin Fusion Brain Instances -->
          <brain id="My Fusion 
    
    Brain">USB\VID_04D8&amp;PID_000C\5&amp;1036E060&amp;0&amp;2</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 -->
      <!-- End Digital Output Instances -->
    
      <!-- Begin Analogue Input Instances -->
          <iochannel id="Steering_Wheel_Control" port="9" brain="My Fusion Brain" 
    
    type="analogue_input">
            <options history="0" 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>
        </all_variables>
      <!-- End Variable Declarations -->
    
      <!-- Begin Logic Declarations -->
        <all_statements>
    
          <if fire_on="logic">
            <boolean_operation type="and">
              <parameter1>
                <boolean_operation type="greater than or equal to">
                  <parameter1>
                    <analogue id="Steering_Wheel_Control" time="0"></analogue>
                  </parameter1>
                  <parameter2>
                    <number>1.4</number>
                  </parameter2>
                </boolean_operation>
              </parameter1>
              <parameter2>
                <boolean_operation type="less than or equal to">
                  <parameter1>
                    <analogue id="Steering_Wheel_Control" time="0"></analogue>
                  </parameter1>
                  <parameter2>
                    <number>1.8</number>
                  </parameter2>
                </boolean_operation>
              </parameter2>
            </boolean_operation>
            <then>
    		<do function="send key" functionTargetID="winamp" vote_opinion="UP" 
    
    vote_priority="medium"></do>
            </then>
          </if>
    
          <if fire_on="logic">
            <boolean_operation type="and">
              <parameter1>
                <boolean_operation type="greater than or equal to">
                  <parameter1>
                    <analogue id="Steering_Wheel_Control" time="0"></analogue>
                  </parameter1>
                  <parameter2>
                    <number>2.1</number>
                  </parameter2>
                </boolean_operation>
              </parameter1>
              <parameter2>
                <boolean_operation type="less than or equal to">
                  <parameter1>
                    <analogue id="Steering_Wheel_Control" time="0"></analogue>
                  </parameter1>
                  <parameter2>
                    <number>2.4</number>
                  </parameter2>
                </boolean_operation>
              </parameter2>
            </boolean_operation>
            <then>
    		<do function="send key" functionTargetID="winamp" vote_opinion="DOWN" 
    
    vote_priority="medium"></do>
            </then>
          </if>
          <if fire_on="logic">
            <boolean_operation type="and">
              <parameter1>
                <boolean_operation type="greater than or equal to">
                  <parameter1>
                    <analogue id="Steering_Wheel_Control" time="0"></analogue>
                  </parameter1>
                  <parameter2>
                    <number>2.8</number>
                  </parameter2>
                </boolean_operation>
              </parameter1>
              <parameter2>
                <boolean_operation type="less than or equal to">
                  <parameter1>
                    <analogue id="Steering_Wheel_Control" time="0"></analogue>
                  </parameter1>
                  <parameter2>
                    <number>3.0</number>
                  </parameter2>
                </boolean_operation>
              </parameter2>
            </boolean_operation>
            <then>
    		<do function="send key" functionTargetID="winamp" vote_opinion="X" 
    
    vote_priority="medium"></do>
            </then>
          </if>
          <if fire_on="logic">
            <boolean_operation type="and">
              <parameter1>
                <boolean_operation type="greater than or equal to">
                  <paarameter1>
                    <analogue id="Steering_Wheel_Control" time="0"></analogue>
                  </parameter1>
                  <parameter2>
                    <number>3.5</number>
                  </parameter2>
                </boolean_operation>
              </parameter1>
              <parameter2>
                <boolean_operation type="less than or equal to">
                  <parameter1>
                    <analogue id="Steering_Wheel_Control" time="0"></analogue>
                  </parameter1>
                  <parameter2>
                    <number>3.9</number>
                  </parameter2>
                </boolean_operation>
              </parameter2>
            </boolean_operation>
            <then>
    		<do function="send key" functionTargetID="winamp" vote_opinion="V" 
    
    vote_priority="medium"></do>
            </then>
          </if>
        </all_statements>
      <!-- End Logic Declarations -->
      </logic>
    </FusionControlCentreConfiguration>

  2. #2
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,052
    The code is correct. Only thing I can think of is you are using a newer version of Winamp. The pre-coded winamp title (why you just have to put "winamp" in) is for version 2.95.

    What version of Winamp are you using?
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  3. #3
    Newbie
    Join Date
    Apr 2008
    Posts
    6
    That might be it, I'm using Winamp 5.33. How do I get the correct targetID?

  4. #4
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,052
    Do you have access to Spy++ or a similar program? I dont think I am aloud to redistribute Spy++ since it is part of the Microsoft EULA crap. But it might be part of Visual Studio Express VB... I know it is not in Visual Studio Express C#. And there are free programs that do just that too that you can download. In the future this will be automatic in the configurator.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  5. #5
    Newbie
    Join Date
    Apr 2008
    Posts
    6
    Ok I got it working with winamp 2.95. The button's have a non-negligible decay time. So it is possible for a higher voltage button press to trigger lower voltage buttons on the way up or down. How can I address this problem?

    Also:

    What is the syntax for sending longer keystrokes, say like CTRL+SHIFT+S

    How can I have a button control the windows master volume?

  6. #6
    Fusion Brain Creator
    Join Date
    Mar 2005
    Posts
    2,221
    Quote Originally Posted by stimpak View Post
    The button's have a non-negligible decay time. So it is possible for a higher voltage button press to trigger lower voltage buttons on the way up or down. How can I address this problem?
    Can you post the circuit you're using?

  7. #7
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,052
    Quote Originally Posted by stimpak View Post
    Ok I got it working with winamp 2.95. The button's have a non-negligible decay time. So it is possible for a higher voltage button press to trigger lower voltage buttons on the way up or down. How can I address this problem?

    Also:

    What is the syntax for sending longer keystrokes, say like CTRL+SHIFT+S

    How can I have a button control the windows master volume?
    Currently only 1 button at a time.

    And if you are just using the steering wheel controls, you can set the sample rate low enough that it will be negligable. If you are using it for more things then it get more complicated, but still doable.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  8. #8
    Newbie
    Join Date
    Apr 2008
    Posts
    6
    Multiple characters would be a very nice thing to have. You could pass off the FB commands to a program like AutoIt and be able to do almost anything.

    I'm using a program called WinID to get the program titles. I'm still trying to get the hang of it though. Before I do something more complicated, I'm trying to pass characters to notepad. WinID says a new instance of notepad has a title of "Untitled - Notepad", but putting that into the configuration file doesn't seem to go anywhere.

  9. #9
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,052
    Ironically, Notepad is really bad for this as it uses 2 different key events in timed firings.

    I have never been able to get Notepad to work.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  10. #10
    Fusion Brain Creator
    Join Date
    Mar 2005
    Posts
    2,221
    Quote Originally Posted by greenman100 View Post
    Can you post the circuit you're using?

Page 1 of 2 12 LastLast

Similar Threads

  1. iGuidance Hacks
    By pbarrette in forum GPS
    Replies: 47
    Last Post: 12-28-2007, 03:06 PM
  2. Service Configuration Files
    By Phatsacks in forum WinNT Based
    Replies: 1
    Last Post: 08-29-2007, 11:03 PM
  3. Relocating computer power button
    By King_Xerxes in forum General Hardware Discussion
    Replies: 8
    Last Post: 02-21-2007, 09:15 PM
  4. Replies: 2
    Last Post: 04-04-2005, 03:45 PM
  5. PC power button problem
    By BMp3W in forum Power Supplies
    Replies: 4
    Last Post: 10-12-2002, 02:36 AM

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
  •