Page 5 of 5

Re: web2rgbmatrix

Posted: Fri Feb 09, 2024 9:58 pm
by Jan007

Hello @P.Ginnungagap,

Can you give some information about how you did it in Batocera?

Many many thanks

Jan


Re: web2rgbmatrix

Posted: Tue Apr 23, 2024 4:16 pm
by Ronald Raiden

I'm a total noob, still waiting for my DE10 to show up. I saw the LED matrix projects and dove down the rabbit hole without hesitation 🤣 so now I need to learn how to make a core for super Nintendo when I get enough panels. The first and last time I even looked at code was the Microsoft XNA framework for Microsoft Xbox 360 arcade games, which I believe was under C #. I almost had a functioning pong game at that point so I think I can handle this but I think I came to the right place


Re: web2rgbmatrix

Posted: Tue Jul 09, 2024 8:44 am
by FDA

Hello!
I'm building a web2rgb matrix to a friend, I compiled the arduino sketch, tested and all is ok.
Is there a way to reset settings so he can connect it to his wifi?
I flashed the hello world sketch and then reflashed web2rgb sketch but it continue to connect to my wifi and there is no way to set it as AP


Re: web2rgbmatrix

Posted: Tue Jul 09, 2024 3:21 pm
by kconger
FDA wrote: ↑Tue Jul 09, 2024 8:44 am

Hello!
I'm building a web2rgb matrix to a friend, I compiled the arduino sketch, tested and all is ok.
Is there a way to reset settings so he can connect it to his wifi?
I flashed the hello world sketch and then reflashed web2rgb sketch but it continue to connect to my wifi and there is no way to set it as AP

If the webrgbmatrix fails to connect to the configured Wifi, it falls back to AP mode.


Re: web2rgbmatrix

Posted: Wed Jul 10, 2024 9:50 am
by FDA
kconger wrote: ↑Tue Jul 09, 2024 3:21 pm
FDA wrote: ↑Tue Jul 09, 2024 8:44 am

Hello!
I'm building a web2rgb matrix to a friend, I compiled the arduino sketch, tested and all is ok.
Is there a way to reset settings so he can connect it to his wifi?
I flashed the hello world sketch and then reflashed web2rgb sketch but it continue to connect to my wifi and there is no way to set it as AP

If the webrgbmatrix fails to connect to the configured Wifi, it falls back to AP mode.

Ah!
It's working! Thank you :)


Re: web2rgbmatrix

Posted: Mon Jul 22, 2024 7:41 pm
by lemon8
Jan007 wrote: ↑Fri Feb 09, 2024 9:58 pm

Hello @P.Ginnungagap,

Can you give some information about how you did it in Batocera?

Many many thanks

Jan

I don't know how he did it, but I also did in Batocera

ssh into the batocera setup, create a folder

Code: Select all

mkdir scripts

Go into the folder

Code: Select all

cd scripts

Create a script

Code: Select all

nano first_script.sh

Paste the script into the nano screen

Code: Select all

#!/bin/bash
# This is an example file of how gameStart and gameStop events can be used.
 
# It's good practice to set all constants before anything else.
logfile=/tmp/scriptlog.txt
 
# Case selection for first parameter parsed, our event.
case $1 in
    gameStart)
        # Commands in here will be executed on the start of any game.
        echo "START" > $logfile
        echo "$@" >> $logfile
        echo "$5" >> $logfile

    filename=$(basename "$5")

echo "$filename" >> $logfile

file=${filename%%.*}

    echo "$file" >> $logfile

curl http://rgbmatrix.local/localplay?file=$file
;;
gameStop)
    # Commands here will be executed on the stop of every game.
    echo "END" >> $logfile

# Display text after game ends
curl http://rgbmatrix.local/text?line=Einde%20Game%20:P
;;
esac

Now run this command

Code: Select all

chmod +x first_script.sh

If the rgb2matrix SD Card has the gifs installed, the gif should be displayed at game start.

More information here Batocera Wiki


Re: web2rgbmatrix

Posted: Mon Jul 22, 2024 8:27 pm
by kconger

You should submit a PR, I'd merge it. :)
If you're not familiar or don't want to I'll add your script and directions to the repo with your approval.

lemon8 wrote: ↑Mon Jul 22, 2024 7:41 pm
Jan007 wrote: ↑Fri Feb 09, 2024 9:58 pm

Hello @P.Ginnungagap,

Can you give some information about how you did it in Batocera?

Many many thanks

Jan

I don't know how he did it, but I also did in Batocera

ssh into the batocera setup, create a folder

Code: Select all

mkdir scripts

Go into the folder

Code: Select all

cd scripts

Create a script

Code: Select all

nano first_script.sh

Paste the script into the nano screen

Code: Select all

#!/bin/bash
# This is an example file of how gameStart and gameStop events can be used.
 
# It's good practice to set all constants before anything else.
logfile=/tmp/scriptlog.txt
 
# Case selection for first parameter parsed, our event.
case $1 in
    gameStart)
        # Commands in here will be executed on the start of any game.
        echo "START" > $logfile
        echo "$@" >> $logfile
        echo "$5" >> $logfile

    filename=$(basename "$5")

echo "$filename" >> $logfile

file=${filename%%.*}

    echo "$file" >> $logfile

curl http://rgbmatrix.local/localplay?file=$file
;;
gameStop)
    # Commands here will be executed on the stop of every game.
    echo "END" >> $logfile

# Display text after game ends
curl http://rgbmatrix.local/text?line=Einde%20Game%20:P
;;
esac

Now run this command

Code: Select all

chmod +x first_script.sh

If the rgb2matrix SD Card has the gifs installed, the gif should be displayed at game start.

More information here Batocera Wiki


Re: web2rgbmatrix

Posted: Mon Jul 22, 2024 9:56 pm
by lemon8

I will create a PR tomorrow, script is also bigger now. ;)