Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Turning CP lighting on/off and other related issues  (Read 892 times)

0 Members and 1 Guest are viewing this topic.

OTT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 71
  • Last login:December 27, 2023, 08:09:07 am
  • I want to build my own arcade controls!
Turning CP lighting on/off and other related issues
« on: November 02, 2023, 10:09:58 am »
For a small project of mine I would like to implement the following features:

1) turn on/off the CP lighting with a toggle switch
2) illuminate some text on the CPO graphics only when a certain event is detected (by activating a microswitch)

All LEDs on CP will be 5V

Now, I have no experience with LED lighting and related software so my questions and what I'm about to write may probably not make sense, please bear with me.


About 1): my first idea was to turn on all the LEDs by connecting them to an interface (e.g. PAC-Drive) and use the toggle switch to cut off the power when "OFF" is selected.
But then I thought that in this way the interface would be disconnected from the USB port and this could perhaps lead to unwanted effects in Windows, especially if the LED ON/OFF operation occurs during a gaming session. I also fear that this procedure could damage the board, at least in the long run.

Ideally, I suppose the best way to proceed would be to turn off the LEDs via software but this would require something that can control them (LedBlinky?) and that only executes this command when the toggle switch is “OFF” and turns the LEDs back on when it is “ON”.

The problem is that I have no idea if LedBlinky can be "controlled" by some third-party software and also there is still the problem that the on/off procedures must reflect the state of the toggle switch: is there some software tool that runs in resident mode, can read the state of the toggle switch (as “key press”, the toggle switch should be connected to a special interface that allows this, I thought of U-HID – is that correct?) and command LedBlinky to turn off or on all LEDs accordingly?

If all this is not possible, what do you suggest as a "clean" solution, i.e. without having to resort to additional control boards such as Arduino and/or the programming of related complicated scripts if not entire software?

About 2): in my intentions, I would like to place a couple of microswitches under the CP as "sensors", i.e. to detect a a specific mechanical movement: the idea would be to illuminate a certain text when microswitch #1 is activated, another text when the #2 is activated and a third text when neither is activated. I want only one text to light up at a time, depending on the state of the microswitches-sensors, so I must also make sure to turn off the text that (possibly) had been previously turned on.
 
Similarly to 1), I could connect the two microswitches to U-HID and associate them with key buttons but then some software is needed which, as already explained, intercepts the pressing of the keys and commands LedBlinky accordingly.

Again, if this “magical” software tool does not exist, or LedBlinky cannot be controlled by third-party software and there is no alternative to LedBlinky that can perform the same functions (control the LEDs), is there anyone who can suggest me a solution that is not incredibly complicated from a technical point of view?

Many thanks!

Fursphere

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1211
  • Last login:Yesterday at 07:03:52 pm
Re: Turning CP lighting on/off and other related issues
« Reply #1 on: November 02, 2023, 11:53:53 am »
LEDBlinky is basically a message bus.   The front end applications just throw commands at it.

"ledblinky.exe <action> <game> <platform>"

You can just throw just about anything you want at it.  And there is the animation language too. 

Its all documented here:  http://ledblinky.net/downloads/readme.txt


OTT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 71
  • Last login:December 27, 2023, 08:09:07 am
  • I want to build my own arcade controls!
Re: Turning CP lighting on/off and other related issues
« Reply #2 on: November 02, 2023, 01:54:50 pm »
LEDBlinky is basically a message bus.   The front end applications just throw commands at it.

"ledblinky.exe <action> <game> <platform>"

You can just throw just about anything you want at it.  And there is the animation language too. 

Its all documented here:  http://ledblinky.net/downloads/readme.txt

Thanks for the reply!

So theoretically it is possible to tell LedBlinky to perform a certain task using external software, basically like frontends do. But when the task concerns many LEDs or multiple operations to be done simultaneously (e.g.: turn off all the LEDs or turn this one on, turn that one off and the other one off) how do you set the command? By any chance is it possible to collect a sequence of actions in a file (such as txt) and then LedBlinky reads it and executes them one by one?

I will read the "readme" file, in the meantime I ask you to get the clear picture on what is possible to do and how.

Regarding a software tool that "calls" LedBlinky after detecting the pressing of a button (see my OP post), can you suggest any name?

Fursphere

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1211
  • Last login:Yesterday at 07:03:52 pm
Re: Turning CP lighting on/off and other related issues
« Reply #3 on: November 02, 2023, 02:27:57 pm »
By any chance is it possible to collect a sequence of actions in a file (such as txt) and then LedBlinky reads it and executes them one by one?

https://www.ledblinky.net/Install.htm

Set Port(s)
  LEDBlinky.exe 14 <port>,<intensity>
  LEDBlinky.exe 14 <port label>,<R/G/B/S>,<intensity>
  LEDBlinky.exe 14 <controller type>,<controller id>,<port>,<intensity>
Note: Intensity values are 0 – 48 (max). If an LED Controller supports a greater range of values (0 – 255 for example), the 0 – 48 value will be proportionally adjusted.


Quote
Regarding a software tool that "calls" LedBlinky after detecting the pressing of a button (see my OP post), can you suggest any name?

I'm not sure about this one.   I suppose you could write and AutoHotKey script to combine the port mapping ledblinky function with specific key press detection.   maybe?

You might want to reach out to Arzoo and get his take.  (LEDBlinky author)


OTT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 71
  • Last login:December 27, 2023, 08:09:07 am
  • I want to build my own arcade controls!
Re: Turning CP lighting on/off and other related issues
« Reply #4 on: November 02, 2023, 02:30:46 pm »
By any chance is it possible to collect a sequence of actions in a file (such as txt) and then LedBlinky reads it and executes them one by one?

https://www.ledblinky.net/Install.htm

Set Port(s)
  LEDBlinky.exe 14 <port>,<intensity>
  LEDBlinky.exe 14 <port label>,<R/G/B/S>,<intensity>
  LEDBlinky.exe 14 <controller type>,<controller id>,<port>,<intensity>
Note: Intensity values are 0 – 48 (max). If an LED Controller supports a greater range of values (0 – 255 for example), the 0 – 48 value will be proportionally adjusted.


Quote
Regarding a software tool that "calls" LedBlinky after detecting the pressing of a button (see my OP post), can you suggest any name?

I'm not sure about this one.   I suppose you could write and AutoHotKey script to combine the port mapping ledblinky function with specific key press detection.   maybe?

You might want to reach out to Arzoo and get his take.  (LEDBlinky author)

Thank you so much, you were really helpful!

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9408
  • Last login:Today at 02:23:13 am
  • Designated spam hunter
Re: Turning CP lighting on/off and other related issues
« Reply #5 on: November 02, 2023, 09:46:24 pm »
For a small project of mine I would like to implement the following features:

1) turn on/off the CP lighting with a toggle switch
2) illuminate some text on the CPO graphics only when a certain event is detected (by activating a microswitch)
You can do both without software/controllers.

Get 5v and ground from either a Molex or a modded USB cable.
- Calculate the max current draw for the number and type of LEDs you'll be using.
- If you'll be using a USB cable, limit the max draw to 500mA (regular USB port) or 100mA. (unpowered hub port)
- Remember to add current-limiting resistors if the LEDs don't already have them built-in.

#1 is the easiest.
- Wire the toggle switch in series with the panel lighting circuit.  You can put it between the LEDs and Ground (shown) or between 5v and the LEDs.

                                                  Switch
    5v ____ Panel lighting LEDs ____/____ Ground

About 2): in my intentions, I would like to place a couple of microswitches under the CP as "sensors", i.e. to detect a a specific mechanical movement: the idea would be to illuminate a certain text when microswitch #1 is activated, another text when the #2 is activated and a third text when neither is activated. I want only one text to light up at a time, depending on the state of the microswitches-sensors

For #2, you'll need 3-tab (COM, NO, NC) microswitches.

                    ____ NC
  COM ____/____ NO

Wire them like this.

           SW1    SW2
                          ____ Msg.#3 LEDs ____Ground
                ____/____ Msg.#2 LEDs ____Ground
  5v ____/_________ Msg.#1 LEDs ____Ground


Scott

OTT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 71
  • Last login:December 27, 2023, 08:09:07 am
  • I want to build my own arcade controls!
Re: Turning CP lighting on/off and other related issues
« Reply #6 on: November 03, 2023, 03:28:21 am »
For a small project of mine I would like to implement the following features:

1) turn on/off the CP lighting with a toggle switch
2) illuminate some text on the CPO graphics only when a certain event is detected (by activating a microswitch)
You can do both without software/controllers.

Get 5v and ground from either a Molex or a modded USB cable.
- Calculate the max current draw for the number and type of LEDs you'll be using.
- If you'll be using a USB cable, limit the max draw to 500mA (regular USB port) or 100mA. (unpowered hub port)
- Remember to add current-limiting resistors if the LEDs don't already have them built-in.

#1 is the easiest.
- Wire the toggle switch in series with the panel lighting circuit.  You can put it between the LEDs and Ground (shown) or between 5v and the LEDs.

                                                  Switch
    5v ____ Panel lighting LEDs ____/____ Ground

About 2): in my intentions, I would like to place a couple of microswitches under the CP as "sensors", i.e. to detect a a specific mechanical movement: the idea would be to illuminate a certain text when microswitch #1 is activated, another text when the #2 is activated and a third text when neither is activated. I want only one text to light up at a time, depending on the state of the microswitches-sensors

For #2, you'll need 3-tab (COM, NO, NC) microswitches.

                    ____ NC
  COM ____/____ NO

Wire them like this.

           SW1    SW2
                          ____ Msg.#3 LEDs ____Ground
                ____/____ Msg.#2 LEDs ____Ground
  5v ____/_________ Msg.#1 LEDs ____Ground


Scott

Thank you!! Yes, this was pretty much my first idea, but you explained it technically in detail  :notworthy: Obviously this method is more straightforward and less laborious to implement, as well as software failure-proof 👍
I will still have to learn to use LEDBlinky (for other projects too) but for what I have to do now I will try to follow your instructions first and see how it comes out.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9408
  • Last login:Today at 02:23:13 am
  • Designated spam hunter
Re: Turning CP lighting on/off and other related issues
« Reply #7 on: November 03, 2023, 04:44:06 am »
Glad to assist.   :cheers:


Scott

arzoo

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2092
  • Last login:April 14, 2024, 11:15:11 am
  • Robots WILL kill you.
    • LEDBlinky
Re: Turning CP lighting on/off and other related issues
« Reply #8 on: November 03, 2023, 04:23:52 pm »
By any chance is it possible to collect a sequence of actions in a file (such as txt) and then LedBlinky reads it and executes them one by one?
You can create a script or batch file that chains together multiple LEDBlinky commands. LEDBlinky will queue them up and execute in order.
Robots will kill you.



Arcade Addiction

OTT

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 71
  • Last login:December 27, 2023, 08:09:07 am
  • I want to build my own arcade controls!
Re: Turning CP lighting on/off and other related issues
« Reply #9 on: November 03, 2023, 04:53:37 pm »
By any chance is it possible to collect a sequence of actions in a file (such as txt) and then LedBlinky reads it and executes them one by one?
You can create a script or batch file that chains together multiple LEDBlinky commands. LEDBlinky will queue them up and execute in order.

Thanks for the clarifications! I will contact you in the next few days because I still have a couple of questions about LEDBlinky  ;D