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 --- Bug Reports --- Site News

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

  

Author Topic: LEDSpicer changing button color when using emitter.  (Read 5474 times)

0 Members and 1 Guest are viewing this topic.

StefanV

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:January 14, 2021, 11:47:20 am
  • I want to build my own arcade controls!
LEDSpicer changing button color when using emitter.
« on: January 03, 2021, 11:34:22 am »
Hi everyone,

I bulidng my first arcade and at the moment I am trying to light my RGB Buttons for my aracde running retropie on a RPI 4.
Using LEDSpicer is working quite well for this.

There is one challenge I am fighting with.
Is there any chance to change the button colors when emitter gathers the configuration from the gameData.xml file?
With my current configuration the button color is always "White", and I would like to change the colors not for every game but for the system.

Attached there is snap from the log file for using emitter with galaga like the example from the LEDSpicer Wiki Pages:
Code: [Select]
Received message: task: CraftProfile, data: arcade/galaga|P2_JOYSTICK1,P2_BUTTON1,P1_JOYSTICK1,P1_BUTTON1|PLAYER1,PLAYER2,2_COINS,2_PLAYERS|arcade|11
changing profile to arcade/galaga
Reading /usr/share/ledspicer/profiles/arcade/galaga.xml
Profile failed: Unable to read the file /usr/share/ledspicer/profiles/arcade/galaga.xml Error=XML_ERROR_FILE_NOT_FOUND ErrorID=3 (0x3) Line number=0: filename=/usr/share/ledspicer/profiles/arcade/galaga.xml
Creating profile with profile_arcade
Reading /usr/share/ledspicer/profiles/profile_arcade.xml
Unknown element P2_JOYSTICK1
Unknown element P2_BUTTON1
Unknown element P1_JOYSTICK1
Using element P1_BUTTON1 color White
Loading animation PLAYER1

I found out that chanig the color is possible when I create a profile for each game.
But that would mean I need to craete a xml profile file for any game played.
From my understanding that would contradict the idea behind using emitter an get the config from the gameData.xml file.

Any hint is much appreaciated.
Thanks, Stefan.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:March 02, 2022, 09:51:19 pm
  • I dare anything! I am Skeletor!
Re: LEDSpicer changing button color when using emitter.
« Reply #1 on: January 04, 2021, 09:07:59 am »
I have a lot of experience with LEDspicer and my system does what you ask with only the profile_arcade. Changing the colors is done automatically with a colors.ini file. I'll get the details and details back to you later.

Meantime I have a write up that could possibly be helpful, though I don't remember if I specifically covered that scenario in it.
Raspberry Pi, AttractMode, and Skeletor enthusiast.

StefanV

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:January 14, 2021, 11:47:20 am
  • I want to build my own arcade controls!
Re: LEDSpicer changing button color when using emitter.
« Reply #2 on: January 04, 2021, 10:40:09 am »
Thanks mahuti for your quick response.    :D
I will take a look in your linked description for the emitter plugin.

I guess the hint to the colors.ini file will be the key.
I haven't found any information to this here in the forum nor in the ledspicer wiki pages.

BTW: The search function of this forum is not working for me.
I alway get the error attached in the uploaded screenshot. Any idea to this issue?

Thanks, Stefan.
« Last Edit: January 04, 2021, 10:41:41 am by StefanV »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 8916
  • Last login:Today at 10:06:37 pm
  • Designated spam hunter
Re: LEDSpicer changing button color when using emitter.
« Reply #3 on: January 04, 2021, 12:30:50 pm »
BTW: The search function of this forum is not working for me.
I alway get the error attached in the uploaded screenshot. Any idea to this issue?
Saint knows about the problem.  http://forum.arcadecontrols.com/index.php/topic,162229.0.html

JRobATL found a way to partly restore search functionality.
You can still use the search feature if you search in message subjects only.

If a subject line search doesn't yield the desired results, add "site:forum.arcadecontrols.com" to an internet search engine query.
- For example, if you want to search for BYOAC posts containing LEDSpicer and emitter the search terms would be,
Code: [Select]
LEDSpicer emitter site:forum.arcadecontrols.comhttps://duckduckgo.com/?q=LEDSpicer+emitter+site%3Aforum.arcadecontrols.com&t=h_&ia=web


Scott

meduza

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 56
  • Last login:August 30, 2021, 10:38:29 am
  • I want to build my own arcade controls!
    • LEDSpicer wiki
Re: LEDSpicer changing button color when using emitter.
« Reply #4 on: January 04, 2021, 01:35:15 pm »
as mahuti, using the color's file is one way to go, you can also use default color per element / group :)


StefanV

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:January 14, 2021, 11:47:20 am
  • I want to build my own arcade controls!
Re: LEDSpicer changing button color when using emitter.
« Reply #5 on: January 04, 2021, 01:49:25 pm »
Quote
If a subject line search doesn't yield the desired results, add "site:forum.arcadecontrols.com" to an internet search engine query.
- For example, if you want to search for BYOAC posts containing LEDSpicer and emitter the search terms would be,

Thanks Scott for catching up and clarification for the search issue!  :cheers:

StefanV

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:January 14, 2021, 11:47:20 am
  • I want to build my own arcade controls!
Re: LEDSpicer changing button color when using emitter.
« Reply #6 on: January 04, 2021, 01:58:25 pm »
as mahuti, using the color's file is one way to go, you can also use default color per element / group :)

Hi meduza, sounds interesting.
How would that be configured correctly?
I tried it setting the color for the buttons (elements) on the profile of the system.
E.g.: in the profile_arcade.xml.
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<LEDSpicer
version="1.0"
type="Profile"
backgroundColor="Black"
>
            <element name="P1_BUTTON1" color="Red" />
            <element name="P1_BUTTON2" color="Green" />
    <element name="P1_BUTTON3" color="Yellow"/>
            <element name="P1_BUTTON4" color="Blue"/>
</LEDSpicer>

But this is not working out for me.
Using emitter sets any of the element to the color "White"

If I configure this for a game / rom profile e.g. galaga or 1942 then this is working well.
But that would mean I need to create a game / rom profile for each game.

Thanks, Stefan.
« Last Edit: January 04, 2021, 02:00:41 pm by StefanV »

meduza

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 56
  • Last login:August 30, 2021, 10:38:29 am
  • I want to build my own arcade controls!
    • LEDSpicer wiki
Re: LEDSpicer changing button color when using emitter.
« Reply #7 on: January 09, 2021, 12:29:29 am »
Hello Stefan, I just found out that I forgot to document this   :-\
to add default colors to elements or groups use
Code: [Select]
defaultColor="Xxx"where Xxx is a color name from the list of colors (the 1st letter normally is Capital)
I will update the docs soon with several features we added lately. 8)

The default color can be override by ElementColor or GroupColor set on profiles  :laugh:

EDIT: Updated documentation added default color and solenoid usage! 8)
check it here
« Last Edit: January 09, 2021, 12:53:36 pm by meduza »


StefanV

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:January 14, 2021, 11:47:20 am
  • I want to build my own arcade controls!
Re: LEDSpicer changing button color when using emitter.
« Reply #8 on: January 09, 2021, 05:35:35 am »
Hi meduza,

thanks for calrification.   :cheers:
I just gave it a try and it works well if set the default color in the ledspicer.conf
But if I set the color for a button element to another color in the system profile (e.g. profile_arcade.xml) it is not working for me.  :dunno

maybe someting else is wrong with my compilitation of LED Spicer:
If I call "ledspicerd -p default" I get a segmentation fault.
Code: [Select]
Initializing Device Ultimarc Ipac Ultimate IO
Connecting to 0xd209:0x410
Detecting interface
No Game Controller mode detected
Claiming interface 2
Dropping privileges to user id 1000 and group id 1000
Privileges dropped
Segmentation fault

My system is a raspberry pi4. The compilation went through witout error.
Any idea?

Thanks, Stefan.


« Last Edit: January 09, 2021, 05:37:13 am by StefanV »

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2757
  • Last login:March 02, 2022, 09:51:19 pm
  • I dare anything! I am Skeletor!
Re: LEDSpicer changing button color when using emitter.
« Reply #9 on: January 09, 2021, 11:27:51 am »
Invalid XML?
Raspberry Pi, AttractMode, and Skeletor enthusiast.

meduza

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 56
  • Last login:August 30, 2021, 10:38:29 am
  • I want to build my own arcade controls!
    • LEDSpicer wiki
Re: LEDSpicer changing button color when using emitter.
« Reply #10 on: January 09, 2021, 12:54:55 pm »
looks like a syntax error, can you paste the profile and any other file used by it here so we can help you?


StefanV

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10
  • Last login:January 14, 2021, 11:47:20 am
  • I want to build my own arcade controls!
Re: LEDSpicer changing button color when using emitter.
« Reply #11 on: January 10, 2021, 08:28:06 am »
looks like a syntax error, can you paste the profile and any other file used by it here so we can help you?

Sure, files attached. ( I renamed the xml files to txt, as the board does not allow xml files)
There is nothing special in the xml files so far.
The default profile works if the ledspicerd daemon is running or if I run "ledspicerd -f" in foreground mode.
It only ends up with segmentation fault if I call it with "ledspcerd -p default".
All other profiles loading with -p also end up in a segmentation fault.

Using normal daemon mode or -f (foreground mode) the following appears to happen:
mslug.xml works as expected the 4 buttons turn blue.
But profile_acade.xml is not working as expected.
If I delete mslug.xml I would expect the profile_arcade.xml to be loaded with turning the buttons into red,
but instead the default colors from the ledspicer.conf are used. B1=Red,B2=Yellow,B3=Green and Button4=Blue.

Thanks, guys for trying to help me out, Stefan.
« Last Edit: January 10, 2021, 09:38:55 am by StefanV »

meduza

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 56
  • Last login:August 30, 2021, 10:38:29 am
  • I want to build my own arcade controls!
    • LEDSpicer wiki
Re: LEDSpicer changing button color when using emitter.
« Reply #12 on: January 18, 2021, 10:24:54 am »
got the files I will check.