Main > Software Forum

LED control from Mame--in over my head again?

<< < (8/24) > >>

1UP:
Thanks Howard, I was wondering how to do this.  I should be able to have a good setup to test this weekend.

1UP:
Howard, I tried the example you gave for othunder, but it didn't quite work.  In my othunder.ini, I tried:

led0=lws 1 16 %s%, lws 1 16 0

This causes the LED to light once and immediately go out until the trigger is released and pulled again.  When I just do "led0=lws 1 16 %s%" it will keep the led on steady as long as the trigger is pulled, until you run out of ammo as expected.

I tried also writing the above in a script, then calling the script with "led0=rfs othunder 0 %s%" in the ini file.  Same result--blinks on briefly then goes out until released.

The closest I've been able to get to rapid fire is with this:

led0=lwp 1 16 130,lws 1 16 %s%

This sets the power state to on/off, and it now blinks (slowly) as long as the trigger is held until the magazine runs out.  If I could control the rate of the flashing, I would be golden, but I can't find this in the docs.  Any ideas?

Howard_Casto:
Don't tell me you've bought a ledwiz just for your guns.  Mind you if you are also lighting your panel and stuff that's worth it, but talk about overkill.... there are enough outputs in the parallel port to fully control two guns. 


That being said, I never implemented the global pulse speed for my app because... well I always thought it was a silly feature, much like the blinking commands.  I can add it in though easily.... literally takes one line of code. 

That being said the ledwiz isn't really known for it's speed when turning on and off lights rapidly.  On top of that, most leds take a few ms to "warm up"  they are incredibly fast at doing so, but what we are trying to do is even more incredibly fast.  I've got a ledwiz sitting here in the floor so I'll see what I can find out.

Howard_Casto:
Hmm... I did all my testing on my custom build of opwolf, and it works fine on it.... opthunder must update only once.  So disregard the other potential issues as I could get the ledw to flash a led fast enough for opwolf, which is quite impressive actually, both for the led and the device.  I'll add the global pulse speed for the next release, but in the mean time, you can make a ledwiz script, not a regular script and set the loop number to a value high enough to where it lasts longer than the overheat time and you should be golden.  The rfs command doesn't support looping (yet)  so it won't help you. 

Howard_Casto:
Ok.. the global pulse speed is still really slow, even set to it's fastest setting (now I remember why i didn't add it, there isn't a lot of difference in the speeds) Also note that you can set the gps in a lwa file and mamehooker supports lwa files. 

That being said... I added looping support to the mhs files and ran the same script with a loop of 200..... works just great on the ledwiz!

It's something I've been meaning to add for quite some time, but it was a pain in the butt and thus far their wasn't a need for it.  I won't release the new mh version for a while though... a few more things to add.  :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version