it was something like this:
#ENABLEHIGHSWITCH#true
#ENABLELOWSWITCH#true
#LOWKEYSEQUENCE#DOWN
#HIGHKEYSEQUENCE#UP
#LOWMAINWINDOWTITLE#winamp
#HIGHMAINWINDOWTITLE#winamp
#HIGHTHRESHHOLD#d0.06
#LOWTHRESHHOLD#d-0.06
in order to press up volume in winamp i need to detect when my potentiometer ouputs say an extra 0.1v.
each time i increase the volts by 0.1v i want to press up arrow
each time i decrease the volts by 0.1v i want to press down arrow
it was something like this:
#ENABLEHIGHSWITCH#true
#ENABLELOWSWITCH#true
#LOWKEYSEQUENCE#DOWN
#HIGHKEYSEQUENCE#UP
#LOWMAINWINDOWTITLE#winamp
#HIGHMAINWINDOWTITLE#winamp
#HIGHTHRESHHOLD#d0.06
#LOWTHRESHHOLD#d-0.06
any ideas / guidance?
hello,
has any one got any ideas on how to control winamp's volume using a potentiometer?
i cannot work out how to do the logic that if the voltage from the potentiometre increases by 0.06V it triggers the sending of the up arrow key to winamp.
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
thank you, sorry didn't mean to be pushy, it's just i have the unit out of the van to do this so i am keen to get it all working and back in again.
bump (?)
sorry I've been really distracted lately. Ill get it to you before I go to sleep tonight
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
Ok, first here is the code I based it off of. This is from the source code to Version 2 software:
So I took that, and made it into logic statements. I havent tested it or anything, but it should work.Code:... else if (AIDynamicButtonList[i].TypeString.Equals("POTENTIOMETER")) { double vtminus1 = AIDynamicButtonList[i].PreviousRawValue; double vtnow = AIDynamicButtonList[i].CurrentRawValue; bool goingup = true; double diff = vtnow - vtminus1; if (diff < 0) { goingup = false; } else if (diff > 0) { goingup = true; } if (goingup && diff > AIDynamicButtonList[i].HighSwitchValue) { //There is less voltage, and the change is greater than the histeresis, so do the up command if (AIDynamicButtonList[i].LOW_KeySequenceString.Equals("*SWITCHOUTPUT*")) { SwitchOutputFromAnalogue(i, false); } else { SendAKeySequenceToAProgram(AIDynamicButtonList[i].LOW_KeySequenceString, AIDynamicButtonList[i].LOW_MainClassString, AIDynamicButtonList[i].LOW_MainWindowString, AIDynamicButtonList[i].LOW_SubClassString, AIDynamicButtonList[i].LOW_SubWindowString); } } else if ((!goingup) && diff < (-1) * AIDynamicButtonList[i].LowSwitchValue) { //There is more voltage, and the change is greater than the histeresis, so do the down command if (AIDynamicButtonList[i].HIGH_KeySequenceString.Equals("*SWITCHOUTPUT*")) { SwitchOutputFromAnalogue(i, true); } else { SendAKeySequenceToAProgram(AIDynamicButtonList[i].HIGH_KeySequenceString, AIDynamicButtonList[i].HIGH_MainClassString, AIDynamicButtonList[i].HIGH_MainWindowString, AIDynamicButtonList[i].HIGH_SubClassString, AIDynamicButtonList[i].HIGH_SubWindowString); } } } ...
My dad has been in town these past 2 weeks so I have been doing a lot of family things ontop of everything else. He leaves tomorrow, so I will have some more time to spend.
XML: http://www.fusioncontrolcentre.com/T...figuration.xml
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
I should note that the hysteresis value is set large right now and the do statement that sends a U is when you want the volume to go up, and the one for D is for down. You will need to change those to the real then/do statements for controlling winamp.
Also make sure in the one that does multiplication it stays "-1" and not just "1". I found a bug in the config that pops up some times, but I need to get to sleep as I need to wake up in less than 2 hours to see my dad off. I'll try to fix the configurator bug shortly...
-- Nick
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
Bookmarks