Welcome to the MP3Car.com forums.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
|
04-22-2008, 08:42 PM
|
#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&PID_000C\5&1036E060&0&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>
|
|
|
04-22-2008, 08:46 PM
|
#2
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Vehicle: 2001 Honda Civic EX Coupe
Posts: 7,041
|
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?
|
|
|
04-22-2008, 09:43 PM
|
#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?
|
|
|
04-22-2008, 09:47 PM
|
#4
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Vehicle: 2001 Honda Civic EX Coupe
Posts: 7,041
|
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.
|
|
|
04-22-2008, 10:51 PM
|
#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?
Last edited by stimpak : 04-22-2008 at 11:56 PM.
|
|
|
04-23-2008, 12:31 AM
|
#6
|
|
Fusion Brain Creator
Join Date: Mar 2005
Posts: 1,889
|
Quote: Originally Posted by stimpak 
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?
|
|
|
04-23-2008, 12:56 AM
|
#7
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Vehicle: 2001 Honda Civic EX Coupe
Posts: 7,041
|
Quote: Originally Posted by stimpak 
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.
|
|
|
04-23-2008, 01:02 AM
|
#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.
|
|
|
04-23-2008, 01:13 AM
|
#9
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Vehicle: 2001 Honda Civic EX Coupe
Posts: 7,041
|
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.
|
|
|
04-23-2008, 01:49 AM
|
#10
|
|
Fusion Brain Creator
Join Date: Mar 2005
Posts: 1,889
|
Quote: Originally Posted by greenman100 
Can you post the circuit you're using?
|
|
|
04-23-2008, 03:06 AM
|
#11
|
|
Newbie
Join Date: Apr 2008
Posts: 6
|
It's just a simple resistor/voltage divider circuit that I made to drive the steering wheel buttons. The stock button controller board used some really complicated method that wasn't resistive. There was some extra capacitance coming from the stock board. I disconnected the buttons from the stock board and they work predictably now.
Anyone have an idea how to control the master volume? I can pass the volume control to Winamp, which can set the wave volume, but it can't do anything about the master. Autohotkey can be set up rather easily to control the master volume, but it doesn't seem to be able to be triggered from FB's key inputs.
|
|
|
04-23-2008, 04:11 PM
|
#12
|
|
Newbie
Join Date: Apr 2008
Posts: 6
|
[quote=2k1Toaster;1204830]Currently only 1 button at a time.
/QUOTE]
Can you run programs from fusion brain? Something like button press -->/path/something.bat
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:30 AM.
|
|