Attract-Mode Support Forum
Attract-Mode Support => Scripting => Topic started by: MV19 on December 17, 2020, 01:23:52 AM
-
Hi. I'm using LEDSpicer to light up my LEDs but I can't for the life of me figure out how to tell it to restart the set of animations I've given it. The author seems to have gone cold on the the net atm, so I'm stumped. I thought I could create an animation set that would last for 2 minutes and then get an AM plugin to restart the profile that LEDSpicer uses to play those animations. I know how to wait a certain amount of time in the plugin and I know how to get it to randomly decide if it should restart the profile. My problem is how to actually call the program from in the plugin.
The command line to restart the profile is
LoadProfile ProfileName
This is the code I have so far, it runs every 20 minutes. Is it even possible to do with with a plugin in AM? I'm on a RASPBERRY PI 4 BTW with Raspbian.
restartPlugin = randInt(10);
if (restartPlugin < 2)
{
// Use LoadProfile command line command to restart the profile
}
Cheers.
-
Hi,
have you tried fe.plugin_command function?
fe.plugin_command( executable, arg_string )
fe.plugin_command( executable, arg_string, environment, callback_function )
fe.plugin_command( executable, arg_string, callback_function )
-
https://github.com/mahuti/Emitter-Plugin
Take a look at that plug-in. You can find similar examples of what you want to do in it.
Also, I think Patricio is visiting his family in Argentina right now. Might be more active when he returns.