Jump to content



Photo
- - - - -

HyperPin / FPLaunch with LEDWiz Modification


  • Please log in to reply
70 replies to this topic

#61 pinballlooking

pinballlooking

    Hobbyist

  • Members
  • PipPip
  • 38 posts

  • Flag: ---------

  • Favorite Pinball: MM

  • PS3 Gamer Tag: NA
  • 360 Gamer Tag: NA

Posted 14 November 2011 - 03:08 PM

Thanks Blur and Darkfall for your changes!
This will make updates so much faster.


#62 netdefilr

netdefilr

    Hobbyist

  • Members
  • PipPip
  • 42 posts
  • Location:Shelby Township, MI

  • Flag: United States of America

  • Favorite Pinball: Funhouse

Posted 02 April 2012 - 03:48 PM

I've added this to my cabinet. It definitely helps but I'm having some problems/questions I need to get worked out.

- After installing. Whether I use Hyperpin or Visual Pinball directly I have to hold down my exit key to quit or 1 push for pause. I have additional buttons, one specifically for pause. How do I change this?
- There's another FPLaunch modification on hyperpin forums that has loading screens, and a push to exit screen. Among other things. Does this work with that script?
- After dabbling with the ledset.vbs. I was wondering if its possible to do animations or more of a phase in and out with the power settings. But I didn't know if I'd have to kill the script with ledclear.vbs because I'd have a loop doing the animation.
- How did the changes I made to Hyperpin affect launching Visual Pinball directly? It changed my key settings for exit(the pause thing.)

Tim


#63 BitPirate

BitPirate

    Enthusiast

  • Members
  • PipPipPip
  • 77 posts
  • Location:Calgary 'Eh'B

  • Flag: Canada

  • Favorite Pinball: Creature from the black lagoon

Posted 24 April 2012 - 07:39 PM

Darkfall, I've tested and this will make a great addition to my Cab. Thank you very much!

My only concern now is that while I understand the need for the ledclear script. I like how the wip 9 project over at hyperspin turned on your leds solid when in future pinball. Using this method cancels that out as your not launching with HPLedcontrol.exe anymore.

I played with the ledclear script and turned on the outputs my leds are connected to which does work, but when I leave HP to go back to windows ...and eventually I have a reason for doing this...the leds are still on and I would like them to clear.

Is there a better way to incorporate the always on leds in fpt and still retain the customization that you have built here?
My Transformers Build - Here

#64 ICPjuggla

ICPjuggla

    Early Retirement

  • VIP
  • 1,193 posts

  • Flag: United States of America

  • Favorite Pinball: Star Wars

Posted 11 May 2012 - 12:13 AM

Love what this adds to my cab. awesome job.

I am having an issue though, when I exit hyperpin back to windows or shut the cab down from the shut down menu in hyperpin my lights stay on. How do I make them turn off on shut down?

Update;
after trying it a few times it works now don't know what I changed or did but it now shut the lights off on shut down.

1 more question how do I change the flipper buttons to be red and not white?

Thx
ICPjuggla

Edited by ICPjuggla, 11 May 2012 - 02:45 AM.

cosmicgunfight-sig2.png breakshot-sig-small3.png atlantis-sig-small.png mousinaround-sig6.png hurricane-sig16.png sc-badge1.png lw-sig.png embryon-logo0.png icp-3.png apollo13_badge(1).png whirlwind_badge0.png playboy_badge0.png oxo1.png raven_logo.png rambo_logo4.png


#65 Darkfall

Darkfall

    Enthusiast

  • Gold Supporter
  • 453 posts
  • Location:Langley, BC

  • Flag: Canada

  • Favorite Pinball: Attack From Mars, Scared Stiff

Posted 11 May 2012 - 05:04 AM

QUOTE (ICPjuggla @ May 10 2012, 05:13 PM) <{POST_SNAPBACK}>
Love what this adds to my cab. awesome job.

I am having an issue though, when I exit hyperpin back to windows or shut the cab down from the shut down menu in hyperpin my lights stay on. How do I make them turn off on shut down?

Update;
after trying it a few times it works now don't know what I changed or did but it now shut the lights off on shut down.

1 more question how do I change the flipper buttons to be red and not white?

Thx
ICPjuggla


Change "S14:1" to "S14:0" and "S15:1" to "S14:0" in the ledset.vbs file. That will avoid turning green and blue on, and just leave the red on. It's all under the flipper section of the script.

QUOTE (netdefilr @ Apr 2 2012, 08:48 AM) <{POST_SNAPBACK}>
I've added this to my cabinet. It definitely helps but I'm having some problems/questions I need to get worked out.

- After installing. Whether I use Hyperpin or Visual Pinball directly I have to hold down my exit key to quit or 1 push for pause. I have additional buttons, one specifically for pause. How do I change this?
- There's another FPLaunch modification on hyperpin forums that has loading screens, and a push to exit screen. Among other things. Does this work with that script?
- After dabbling with the ledset.vbs. I was wondering if its possible to do animations or more of a phase in and out with the power settings. But I didn't know if I'd have to kill the script with ledclear.vbs because I'd have a loop doing the animation.
- How did the changes I made to Hyperpin affect launching Visual Pinball directly? It changed my key settings for exit(the pause thing.)

Tim


Anything FPLaunch WIP8 and later has the modifications already integrated (which is why this thread is mostly dead now). Just enable it in the FPLaunch script and make sure the two .vbs files are in the directory. In short, you should be able to upgrade easily.

You can do animations, but the ledset script needs to exit, or HyperPin will hang up waiting for it to finish your animation. If you're doing a looped animation that never exits, that will be a problem.

The hold to exit thing is normal with later FPLaunch releases. If you read the FPLaunch thread, there is discussion for those who have a dedicated pause button.


QUOTE (BitPirate @ Apr 24 2012, 12:39 PM) <{POST_SNAPBACK}>
Darkfall, I've tested and this will make a great addition to my Cab. Thank you very much!

My only concern now is that while I understand the need for the ledclear script. I like how the wip 9 project over at hyperspin turned on your leds solid when in future pinball. Using this method cancels that out as your not launching with HPLedcontrol.exe anymore.

I played with the ledclear script and turned on the outputs my leds are connected to which does work, but when I leave HP to go back to windows ...and eventually I have a reason for doing this...the leds are still on and I would like them to clear.

Is there a better way to incorporate the always on leds in fpt and still retain the customization that you have built here?


I can't answer to this. I don't use Future Pinball, so I never consider it's needs when putting this together. I wouldn't have thought it would have caused a problem, but apparently it does. There's a way to make an exception to bypass the ledset when launching Future Pinball, but I wouldn't have a way to test it without putting Future Pinball on my cabinet.
...Paul


Check out Wildfire Pinball's build details here: Project Wildfire

#66 ICPjuggla

ICPjuggla

    Early Retirement

  • VIP
  • 1,193 posts

  • Flag: United States of America

  • Favorite Pinball: Star Wars

Posted 11 May 2012 - 09:52 PM

Thank you Darkfall worked like a charm!

For some reason I'm still having problems with the lights shutting off on shut down though hyperpin! Anyone else having this issue and if so how do I fix it?!

Edited by ICPjuggla, 13 May 2012 - 09:14 PM.

cosmicgunfight-sig2.png breakshot-sig-small3.png atlantis-sig-small.png mousinaround-sig6.png hurricane-sig16.png sc-badge1.png lw-sig.png embryon-logo0.png icp-3.png apollo13_badge(1).png whirlwind_badge0.png playboy_badge0.png oxo1.png raven_logo.png rambo_logo4.png


#67 ArcadiusMaximus

ArcadiusMaximus

    Quit throwing trash into my dimension !

  • Members
  • PipPipPip
  • 310 posts
  • Location:PITZBORG, PA

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Scared Stiff, White Water

Posted 14 September 2012 - 06:24 PM

Thank you Darkfall worked like a charm!

For some reason I'm still having problems with the lights shutting off on shut down though hyperpin! Anyone else having this issue and if so how do I fix it?!


Im also having this problem. Lights stay on after exiting hyperpin. I was going to try and add the .bat file to the exit script in the settings and see if that works.


I also have another issue. When trying to view instructions during a game I get the following error:

Function Name 'Menu'
Error: The COM object may not be a valid Dispatch Object!
First ensure that COM library has be initialized through COM_Init().
0

Will Continue?


Thoughts?
~ Mr. John E. Smith III Esq.

#68 ressof

ressof

    Enthusiast

  • Members
  • PipPipPip
  • 59 posts

  • Flag: Sweden

  • Favorite Pinball: World Cup Soccer

Posted 21 September 2012 - 05:36 AM

When trying to view instructions during a game I get the following error:

Function Name 'Menu'
Error: The COM object may not be a valid Dispatch Object!
First ensure that COM library has be initialized through COM_Init().
0

Will Continue?


Thoughts?


I also have this problem.

When I push the "i" key while browesing tables in hyperpin the instruction card pop up but when im in a game and try to view the instruction card by menu or with the "i" key i get the message above

Edited by ressof, 21 September 2012 - 05:37 AM.


#69 ArcadiusMaximus

ArcadiusMaximus

    Quit throwing trash into my dimension !

  • Members
  • PipPipPip
  • 310 posts
  • Location:PITZBORG, PA

  • Flag: United States of America

  • Favorite Pinball: Attack from Mars, Scared Stiff, White Water

Posted 01 October 2012 - 03:19 PM


When trying to view instructions during a game I get the following error:

Function Name 'Menu'
Error: The COM object may not be a valid Dispatch Object!
First ensure that COM library has be initialized through COM_Init().
0

Will Continue?


Thoughts?


I also have this problem.

When I push the "i" key while browesing tables in hyperpin the instruction card pop up but when im in a game and try to view the instruction card by menu or with the "i" key i get the message above


Hey there,
I think I figured out the solution to our ( or anyone elses) problem whom have encountered this error. Check it out:
http://www.vpforums....showtopic=21321
~ Mr. John E. Smith III Esq.

#70 Zarquon

Zarquon

    Hobbyist

  • Members
  • PipPip
  • 37 posts
  • Location:Vancouver, BC

  • Flag: Canada

  • Favorite Pinball: Medevil Maddness

Posted 09 October 2012 - 05:19 AM


Darkfall, I've tested and this will make a great addition to my Cab. Thank you very much!

My only concern now is that while I understand the need for the ledclear script. I like how the wip 9 project over at hyperspin turned on your leds solid when in future pinball. Using this method cancels that out as your not launching with HPLedcontrol.exe anymore.

I played with the ledclear script and turned on the outputs my leds are connected to which does work, but when I leave HP to go back to windows ...and eventually I have a reason for doing this...the leds are still on and I would like them to clear.

Is there a better way to incorporate the always on leds in fpt and still retain the customization that you have built here?


I can't answer to this. I don't use Future Pinball, so I never consider it's needs when putting this together. I wouldn't have thought it would have caused a problem, but apparently it does. There's a way to make an exception to bypass the ledset when launching Future Pinball, but I wouldn't have a way to test it without putting Future Pinball on my cabinet.


First off THANK YOU Darkfall and also a thankyou to Blur for his modifications.

I to am running Future Pinball and wanted to get it working with this script. I also wanted to be able to light up tables based on their theme using my RGB buttons and finally be able to light up Visual Pinball tables not supported by the ledcontrol scripts.

What I have done is modify the script created by Darkfall and then

First I edited the FP Launch a little further than what Blur has already added by adding parameters for systemName and tableName to be passed into DarkFalls batch files. The added line now looks like this:
Run, "%A_ScriptDir%\ledclear.bat" "%systemName%" "%tableName%",,hide
This modification is backward compatible with Darkfalls original scripts and I am hoping Blur could include this minor mod in his next release.

Second I modified the ledclear batch file to handle the parameters and pass them on to the script.

@ECHO OFF
SET CSCRIPT_EXE=cscript.exe
IF EXIST %SystemRoot%\syswow64\cscript.exe SET CSCRIPT_EXE=%SystemRoot%\syswow64\cscript.exe
%CSCRIPT_EXE% ledwiz.vbs /S=%1 /T=%2
(A quick note as well I modified the batch file to be smart enough to detect if Windows is 64 bit and call the correct CSCRIPT.EXE is so to make installation easier.)


Next I created a single script file which will be called from the batch file to handle the led configurations but wanted it to be able to handle multiple configurations based on system and table. The new name for this VBScript file is ledwiz.vbs and is called in the batch file above. The script reads a xml configuration file which stores the output ports and the system and table specific configurations. Lastly I also added feature that give you the ability to create a table specific script that can be run as well and is easily configurable.

ledwiz.vbs:

'Set default parameter values.
param_delay = 10 ' Delay 10ms between commands
param_log = False ' Log activity for debugging to STDOUT
param_system = "" ' System to use. Examples HyperPin, Future Pinball, Visual Pinball
param_table = "" ' Table being used.
param_xml = "ledwiz.xml" ' Configuration XML to use.

'Initialize flags to check if parameters are passed in rather than load from XML.
bool_delay_passed = False
bool_log_passed = False

'Process parameters passed to script.
If WScript.Arguments.Count > 0 Then
Set objArgs = WScript.Arguments
For Each Argument in objArgs
Select Case UCase(Left(Argument,3))
Case "/S="
param_system = Mid(Argument,4)
Case "/T="
param_table = Mid(Argument,4)
Case "/X="
param_xml = Mid(Argument,4)
Case "/D="
param_delay = CInt(Mid(Argument,4))
bool_delay_passed = True
Case "/L"
param_log = True
bool_log_passed = True
Case Else
MsgBox "Error: Unrecogognized parameter." & Chr(13) & Chr(10) & Argument, 16
WScript.Echo "Error: Unrecogognized parameter." & Chr(13) & Chr(10) & "Parameter: " & Argument
End Select
Next
End If

If param_log Then
WScript.Echo "System: " & param_system
WScript.Echo "Table: " & param_table
End If

'Read the XML configuration file
Set xmlDoc = CreateObject( "Microsoft.XMLDOM" )
xmlDoc.Async = "False"
xmlDoc.SetProperty "SelectionLanguage", "XPath"
xmlDoc.SetProperty "ServerHTTPRequest", True
xmlDoc.validateOnParse = False
xmlDoc.resolveExternals = False

xmlDoc.Load(param_xml)

If xmlDoc.parseError.errorCode <> 0 Then
ErrorMessage = "Error Code: " & xmlDoc.parseError.errorCode & Chr(13) & Chr(10) & "Error Reason: " & xmlDoc.parseError.reason & Chr(13) & Chr(10) & "Line Number: " & xmlDoc.parseError.line
MsgBox "Error: Loading XML document (" & param_xml & ") failed." & Chr(13) & Chr(10) & ErrorMessage, 16
WScript.Echo "Error: Loading XML document (" & param_xml & ") failed." & Chr(13) & Chr(10) & ErrorMessage
Else
If Not bool_log_passed Then
Set objNode = xmlDoc.selectSingleNode("/ledwiz/config/log")
If Not objNode Is Nothing then
param_log = CBool(objNode.Text)
If param_log Then
WScript.Echo "XML Config: Logging Turn On"
End If
End If
End If

If Not bool_delay_passed Then
Set objNode = xmlDoc.selectSingleNode("/ledwiz/config/delay")
If Not objNode Is Nothing then
delay = CInt("0" & objNode.Text)
If delay > 0 Then
param_delay = delay
If param_log Then
WScript.Echo "XML Config: Delay set to " & param_delay
End If
End If
End If
End If

'Read the Port Numbers for your LED Buttons connected to your LED-Wiz from the XML configuration file
Set colNodes = xmlDoc.selectNodes("/ledwiz/config/ports/port")
If colNodes.length = 0 Then
If param_log Then
WScript.Echo "Warning: No Ports found."
End If
Else
Set ports = CreateObject("Scripting.Dictionary")
For Each objNode in colNodes
ports.Add objNode.getAttribute("button"), objNode.text
If param_log Then
WScript.Echo "Adding port for " & objNode.getAttribute("button") & " button: " & objNode.text
End If
Next

On Error Resume Next

If Len(param_system) > 0 Then
Set colNodes = xmlDoc.selectNodes("/ledwiz/system[@name='" & param_system & "']/table[@name='" & param_table & "']/button")
If colNodes.length > 0 And param_log Then
WScript.Echo "Loading config for system: " & param_system & " table: " & param_table
Else
If Len(param_table) > 0 And param_log Then
WScript.Echo "No configuration for table: " & param_table & " on system: " & param_system
End If
Set colNodes = xmlDoc.selectNodes("/ledwiz/system[@name='" & param_system & "']/button")
If colNodes.length > 0 And param_log Then
WScript.Echo "Loading config for system: " & param_system
End If
End If
If colNodes.length > 0 Then
Set LedControl = CreateObject("LEDWiz_Control.LED_Wiz")
If param_log Then
WScript.Echo "LED-Wiz Detected: " & LedControl.Detected
End If

If LedControl Is Nothing Then
MsgBox "Error: Unable to initialize LEDWiz or Pac-Drive. Verify that the OCX or DLL is registered and the board is connected.", 16
If param_log Then
WScript.Echo "Error: Unable to initialize LEDWiz or Pac-Drive. Verify that the OCX or DLL is registered and the board is connected."
End If
End If

LedControl.Command = "SBA:0,0,0,0,3" ' Reset all LEDWiz banks to off, set pulse speed to 3
WScript.Sleep(param_delay)

For Each objNode in colNodes
ButtonName = objNode.getAttribute("name")
PortNumber = ports.Item(ButtonName)
Intensity = CInt("0" & objNode.text)
If Intensity <> 0 Then
If param_log Then
WScript.Echo "Button " & ButtonName & " (port " & PortNumber & ") to " & Intensity
End If
LedControl.Command = "S" & PortNumber & ":1" ' Turn on LEDWiz output
WScript.Sleep(param_delay)
LedControl.Command = "P" & PortNumber & ":" & Intensity ' Set LEDWiz output
WScript.Sleep(param_delay)
Else
If param_log Then
WScript.Echo "Button " & ButtonName & " (port " & PortNumber & ") Off"
End If
LedControl.Command = "S" & PortNumber & ":0" ' Turn on LEDWiz output
WScript.Sleep(param_delay)
End If
Next
Else
If param_log Then
WScript.Echo "No configuration for system: " & param_system
End If
End If
End If
End If
If Len(param_table) > 0 and False Then
ScriptFile = ".\LEDWiz\" & param_table & ".vbs"
ShellCommand = "%comspec% /c cscript.exe """ & ScriptFile & """ /D=" & param_delay
If param_log Then
ShellCommand = ShellCommand & " /L > "".\LEDWiz\" & param_table & ".log"""
WScript.Echo "Running script for " & param_table
WScript.Echo ShellCommand
End If
Set WshShell = WScript.CreateObject("WScript.Shell")
intReturn = WshShell.Run(ShellCommand, 0, False)
End If
End If

ledwiz.xml:
<ledwiz>
<config>
<!-- Delay between commands to the ledwiz in ms -->
<delay>10</delay>
<!-- Set to True to send detailed output to STDOUT
	 this can be captured by altering the ledwiz.bat -->
<log>False</log>
<!-- Output port numbers for your buttons on the LED-Wiz. -->
<ports>
<!-- Button names can be any thing you want but must
	 match the names used in the system button nodes
	 in the system and table sections below -->
<port button="Start">01</port>
<port button="Launch">02</port>
<port button="Exit">03</port>
<port button="Extraball">04</port>
<port button="Coin">05</port>
<port button="FlipperR">06</port>
<port button="FlipperG">07</port>
<port button="FlipperB">08</port>
</ports>
</config>
<system name="HyperPin">
<button name="Start">130</button>
<button name="Launch">48</button>
<button name="Exit">48</button>
<button name="Extraball">24</button>
<button name="Coin">48</button>
<!-- White for the Flippers -->
<button name="FlipperR">48</button>
<button name="FlipperG">48</button>
<button name="FlipperB">48</button>
</system>
<system name="Future Pinball">
<button name="Start">48</button>
<button name="Launch">48</button>
<button name="Exit">48</button>
<button name="Extraball">0</button>
<button name="Coin">48</button>
<!-- Blue for the Flippers -->
<button name="FlipperR">0</button>
<button name="FlipperG">0</button>
<button name="FlipperB">48</button>
<table name="FlameReaperSE4"> <!-- Note this table name matches the table name in the Future Pinball database XML -->
<button name="Start">48</button>
<button name="Launch">48</button>
<button name="Exit">48</button>
<button name="Extraball">0</button>
<button name="Coin">48</button>
<!-- Warm yellow for the Flippers -->
<button name="FlipperR">48</button>
<button name="FlipperG">30</button>
<button name="FlipperB">0</button>
</table>
<table name="RobotsInvasionRC1c">
<button name="Start">48</button>
<button name="Launch">48</button>
<button name="Exit">48</button>
<button name="Extraball">0</button>
<button name="Coin">48</button>
<!-- Green for the Flippers -->
<button name="FlipperR">0</button>
<button name="FlipperG">48</button>
<button name="FlipperB">0</button>
</table>
<table name="Ironman GOLD 1.03">
<button name="Start">48</button>
<button name="Launch">48</button>
<button name="Exit">48</button>
<button name="Extraball">0</button>
<button name="Coin">48</button>
<!-- Green for the Flippers -->
<button name="FlipperR">48</button>
<button name="FlipperG">20</button>
<button name="FlipperB">0</button>
</table>
</system>
<system name="Visual Pinball">
<table name="DropACard_2011_FS">
<button name="Start">130</button>
<button name="Launch">130</button>
<button name="Exit">48</button>
<button name="Extraball">0</button>
<button name="Coin">48</button>
<!-- Dark Cyan for the Flippers -->
<button name="FlipperR">3</button>
<button name="FlipperG">22</button>
<button name="FlipperB">19</button>
</table>
</system>
</ledwiz>
(Sorry pasting the code here seems to have lost the indentation.)


Lastly I modified the ledset.bat to pass in hyperspin as the system to ledwiz.vbs.
@ECHO OFF
SET CSCRIPT_EXE=cscript.exe
IF EXIST %SystemRoot%\syswow64\cscript.exe SET CSCRIPT_EXE=%SystemRoot%\syswow64\cscript.exe
%CSCRIPT_EXE% ledwiz.vbs /s=HyperPin

Comments? Suggestions?

Darkfall if you want to use any or all of this code feel free. Anyone else that wants to use it I will try and provide support as well.

Attached Files


Edited by Zarq, 09 October 2012 - 05:19 AM.


#71 skewba98z28

skewba98z28

    Hobbyist

  • Members
  • PipPip
  • 27 posts

  • Flag: ---------

  • Favorite Pinball: Ripley's Believe it of Not, Theater of Magic

Posted 24 January 2013 - 06:43 AM

What's up guys I have been messing around with this for a few days and it is still not done, but I just thought I would show the progress. Basically I added code to Darkfalls LEDwiz Mod vbs to activate an attract mode animation so to speak using ledblinky. I wanted my cree's to flash at a certain point when hyperpin was idle so I tried manually programming an animation, but my lack of skills and it being a major time consumer told me to quit while I was ahead. I got to thinking about my MAME cab and all the animations ledblinky has programmed already. I installed it and ran an animation, but when I did my contactors lights and all went crazy!!! I picked one of the existing animations and modified it to only turn on outputs 1-15 because those are the outputs my crees are hooked to. Once I did that I had 1 animation I could use. Now in the ledset.vbs file I added some code to launch ledblinky.exe and the animation I modified after the existing code that turns on the start button etc. Of course between this code I need an delay to set how long it takes the attract mode to start. Then after the attract run code I added another delay before the code to kill the animation. After that code I just copied the existing code that lights the buttons and added it again to the end of the script if that makes any sense.

Outline of code:

Code to lights buttons

delay (5min)

run animation

delay (30 secs)

kill animation

Copy of code to light buttons

In theory you could do that over and over again to make the attract animation run more than once. There might be a better way also, but i'm a total noob to programming! Like they said there's 1000 ways to skin a cat. ;) I also had to add one line to the ledclear batch file to kill the script if it hasn't completed when you start a table. Heres a progress video of it running. I'll post the code and directions when I get it all lined out.

PS Ignore the flaws in my cab its not done! ;) Also the time delay to start the animation is short for testing purposes.

 

 

How to:

 

Ok guys here is directions and the code and this was all done on Windows XP. I might work on 7 but I have no way of knowing.

1. If you have not setup darkfalls ledwiz mod stop right now and get that setup first!!!!!! The mod and directions can be found here!

http://www.vpforums....showtopic=16186


2. If you have Darkfalls ledwiz mod done and you are happy with the way your start button, exit, launch button etc light up with hyperspin proceed to the next step.

3. We need to get two programs from the net. One is called pskill get it here

http://download.sysi...les/PSTools.zip

Once downloaded unzip and copy just pskill.exe to (C:\WINDOWS\system32) We also need ledblinky which can be downloaded here

http://dndw.com/ledblinky/Download.htm

Create a folder in your hyperpin folder called ledblinky and unzip the ledblinky package to it. (C:\HyperPin\LEDBlinky)

Now on to the the fun stuff.

4. Unplug the power supplies to your toys!!!!

5. First we need to generate a input map in ledblinky. Which we're actually not going to add inputs, but you need this to edit an existing ledblinky animation. Go to (C:\HyperPin\LEDBlinky\LEDBlinky) and open GenLEDBlinkyInputMap.exe. Once this is open you need to know which ledwiz outputs your flashers are hooked to. I have 5 Cree RGB flashers and I have them hooked to outputs 1-15 on the ledwiz. For example Cree outside left is hooked to outputs 1-3. Output 1 red, Output 2 green, Output 3 blue and so on. So in the GenLedblinky program we haved pulled up we are going to select Port 1 and we are going to label that port P1B1. Now in my case because my flashers are hooked to ports 1-15 with outside left hooked to ports 1-3 on the ledwiz. I want to set Port 1,  P1B1, to led type RGB-Red. Once that is done click set port. Now select port 2 from the drop down menu and label it P1B1 and set the led type to RGB-Green and hit set port. Now select port 3 label it P1B1 and set the led type to RGB-Blue. Basically we are pretending each RGB flasher is a single button. Do this for all 5 of your flashers and be sure to change the label on each flasher. Now lets say your flashers are not hooked to ports 1-15 and there hooked to port 3-18. You will set port 1 to P1B1 and the led type to single. then Port 2 will be P1B2 and of course the led type to single again. Set all 32 outputs as I have explained here. See my input map for reference. Like I said my flashers are hooked to ports 1-15. Click save and name it "flasher" It will then create a file called flasher.lay

geninput_zps1c31fb3e.jpg

6. Next we need to create our ledblinky animation which is the led animation to run the flashers in the attract mode. Currently my front panel buttons go off when the attract mode runs. Ledblinky overrides darkfalls script to turn on the buttons, but in theory you could have your buttons flash with the animation. I'm not going to cover that at this time we're just going to worry about the flashers. I feel though after you go thru this you will be able to add the buttons to the attract mode on your own if you want. Now we need to open "LEDBlinkyAnimationEditor.exe" once you do that click layout-> open and then select flasher.lay. When you do that it is going to put a bunch of buttons in the window named whatever you labeled them in the previous step. Like I said before my flashers are hooked to port 1-15 and we are pretending each flasher is a button so P1B1 - P1B5 are my flashers. Now drag all the other buttons away from whatever buttons are your flashers. See my layout for example.

layout_zpsde57ea32.jpg

Now select Animation -> Open and select (Pattern01.lwax) This animation consist of 32 frames. Each frame turns on certain leds, but the problem is we only want to turn on our flashers and not our contactors, knocker, etc. When you open the animation it is on the first frame. You want to right click every button that are not your flashers and select toggle off. Remember do not toggle off your flashers. In my case P1B1-P1B5. Once you have all the buttons toggled off that are not your flashers in frame 1 you want to hit the next frame button and do the same thing. Repeat this for all 32 frames and save the animation as "test". Once you have done this plug your power supples back up and hit run led animation. When you do this it should only light your flashers.

7. Now its time to add the code to make all of this work on its own ;) Open up the ledset.vbs file that you should already configured to light your front panel buttons. Go to the end of the last line hit enter and add this

 

WScript.Sleep(40000) ' Sets delay time until first attract mod

 

 

(Note:You can change 4000 to shorter or longer depending on your preference)

After that hit enter twice and add this code to your script

 

' Turn on attract

strProgramPath = "C:\HyperPin\LEDBlinky\LEDBlinky\LEDBlinky.exe test.lwax"

SET objShell = CREATEOBJECT("Wscript.Shell")

objShell.Run strProgramPath WScript.Sleep(10000) ' Sets how long the attract mode runs

'Turn off attract

strProgramPath = "C:\HyperPin\LEDBlinky\LEDBlinky\LEDBlinky.exe 11"

SET objShell = CREATEOBJECT("Wscript.Shell")

objShell.Run strProgramPath WScript.Sleep(1000)

 

 

Once you do that your ledset.vbs file should looks something like this!

 

Delay = 10 ' Delay 10ms between commands

 

On Error Resume Next

Set LedControl = CreateObject("LEDWiz_Control.LED_Wiz")

If LedControl Is Nothing Then  MsgBox "Error: Unable to initialize LEDWiz or Pac-Drive. Verify that the OCX or DLL is registered and the board is connected.",16 End If

LedControl.Command = "SBA:0,0,0,0,3" ' Reset all LEDWiz banks to off, set pulse speed to 3 WScript.Sleep(Delay)

' Turn on Launch Ball button, full brightness

LedControl.Command = "S26:1" ' Turn on LEDWiz output 26 (Launch Ball button) WScript.Sleep(Delay) LedControl.Command = "P26:130" ' Set LEDWiz output 26 to full brightness WScript.Sleep(Delay)

' Set flipper buttons to white, full brightness

' Turn on Start button, set to flash

LedControl.Command = "S25:1" ' Turn on LEDWiz output 25 (Start button) WScript.Sleep(Delay) LedControl.Command = "P25:48" ' Set LEDWiz output 25 to flash WScript.Sleep(Delay)

' Turn on Exit button

LedControl.Command = "S28:1" ' Turn on LEDWiz output 28 (Exit) WScript.Sleep(Delay) LedControl.Command = "P28:48" ' Set LEDWiz output 28 full brightness WScript.Sleep(Delay)

' Turn on Extra Ball button

LedControl.Command = "S27:1" ' Turn on LEDWiz output 27 (Extra ball) WScript.Sleep(Delay) LedControl.Command = "P27:48" ' Set LEDWiz output 27 full brightness WScript.Sleep(40000) ' Sets delay time until first attract mode

' Turn on attract

strProgramPath = "C:\HyperPin\LEDBlinky\LEDBlinky\LEDBlinky.exe test.lwax"

SET objShell = CREATEOBJECT("Wscript.Shell")

objShell.Run strProgramPath WScript.Sleep(10000) ' Sets how long the attract mode runs

'Turn off attract

strProgramPath = "C:\HyperPin\LEDBlinky\LEDBlinky\LEDBlinky.exe 11"

SET objShell = CREATEOBJECT("Wscript.Shell")

objShell.Run strProgramPath WScript.Sleep(1000)

 

Now if we just left it at that your buttons would come on for a certain amount of time, then the attract mode would run, and then the attract mode would turn off and your buttons would not come back on. You just need to copy and paste the code that lights your buttons to the end of the code you have in your ledset.vbs already. It should look something like this once you have done that.

 

Delay = 10 ' Delay 10ms between commands

 

On Error Resume Next

Set LedControl = CreateObject("LEDWiz_Control.LED_Wiz")

If LedControl Is Nothing Then  MsgBox "Error: Unable to initialize LEDWiz or Pac-Drive. Verify that the OCX or DLL is registered and the board is connected.",16 End If

LedControl.Command = "SBA:0,0,0,0,3" ' Reset all LEDWiz banks to off, set pulse speed to 3 WScript.Sleep(Delay)

' Turn on Launch Ball button, full brightness

LedControl.Command = "S26:1" ' Turn on LEDWiz output 26 (Launch Ball button) WScript.Sleep(Delay) LedControl.Command = "P26:130" ' Set LEDWiz output 26 to full brightness WScript.Sleep(Delay)

' Set flipper buttons to white, full brightness

' Turn on Start button, set to flash

LedControl.Command = "S25:1" ' Turn on LEDWiz output 25 (Start button) WScript.Sleep(Delay) LedControl.Command = "P25:48" ' Set LEDWiz output 25 to flash WScript.Sleep(Delay)

' Turn on Exit button

LedControl.Command = "S28:1" ' Turn on LEDWiz output 28 (Exit) WScript.Sleep(Delay) LedControl.Command = "P28:48" ' Set LEDWiz output 28 full brightness WScript.Sleep(Delay)

' Turn on Extra Ball button

LedControl.Command = "S27:1" ' Turn on LEDWiz output 27 (Extra ball) WScript.Sleep(Delay) LedControl.Command = "P27:48" ' Set LEDWiz output 27 full brightness WScript.Sleep(40000) ' Sets delay time until first attract mode

' Turn on attract

strProgramPath = "C:\HyperPin\LEDBlinky\LEDBlinky\LEDBlinky.exe test.lwax"

SET objShell = CREATEOBJECT("Wscript.Shell")

objShell.Run strProgramPath WScript.Sleep(10000) ' Sets how long the attract mode runs

'Turn off attract

strProgramPath = "C:\HyperPin\LEDBlinky\LEDBlinky\LEDBlinky.exe 11"

SET objShell = CREATEOBJECT("Wscript.Shell")

objShell.Run strProgramPath WScript.Sleep(1000)

'Resume Front Panel

' Turn on Launch Ball button, full brightness

LedControl.Command = "S26:1" ' Turn on LEDWiz output 26 (Launch Ball button) WScript.Sleep(Delay) LedControl.Command = "P26:130" ' Set LEDWiz output 26 to full brightness WScript.Sleep(Delay)

' Set flipper buttons to white, full brightness

' Turn on Start button, set to flash

LedControl.Command = "S25:1" ' Turn on LEDWiz output 25 (Start button) WScript.Sleep(Delay) LedControl.Command = "P25:48" ' Set LEDWiz output 25 to flash WScript.Sleep(Delay)

' Turn on Exit button

LedControl.Command = "S28:1" ' Turn on LEDWiz output 28 (Exit) WScript.Sleep(Delay) LedControl.Command = "P28:48" ' Set LEDWiz output 28 full brightness WScript.Sleep(Delay)

' Turn on Extra Ball button

LedControl.Command = "S27:1" ' Turn on LEDWiz output 27 (Extra ball) WScript.Sleep(Delay) LedControl.Command = "P27:48" ' Set LEDWiz output 27 full brightness WScript.Sleep(Delay)

 

 

At this point you have it set to light your front buttons for a certain amount of time. Then run the attract mode for a certain amount of time. Then relight your front panel buttons which will stay on until you start a table or close hyperpin. Now if you want to run the attract mode more than once just add the code for a delay and copy and paste the ' Turn on Attract, ' Turn off Attract, ' Resume front panel code as many times as you want with a delay after the 'Resume front panel code.

8. Ok guys we are almost done!!!! Shew!!!! Open your ledclear.bat file with note pad and this code

 

Start C:\HyperPin\LEDBlinky\LEDBlinky\LEDBlinky.exe 11
pskill cscript.exe

 

So the ledclear.bat file should look like this

 

@cscript.exe ledclear.vbs
Start C:\HyperPin\LEDBlinky\LEDBlinky\LEDBlinky.exe 11
pskill cscript.exe

 

Thats it YOUR DONE!!!!!

To be noted. Ledblinky is a trial version unless you buy it. This means that when the first animation runs after you have powered up your cab it will flash a splash screen and will say ledblinky over the speakers. It will only do this one time until you power down your cab and power it back on.

I tried to explain this the best I could and be descriptive as possible. If you have any questions feel free to ask here an I will try to help!

Matt


Edited by skewba98z28, 24 January 2013 - 06:58 AM.