Author Topic: can I start a sequence by a trigger/switch?  (Read 3342 times)

Offline FireMedic4Christ

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Brighton, CO
  • Posts: 252
  • Kudos: 1
can I start a sequence by a trigger/switch?
« on: July 16, 2014, 08:46:00 PM »
Does the F-16 have the ability to start a sequence when a trigger is activated like the LOR controllers?

To explain my goal:

I have been asked to help "light" the high school marching band this year. They would prefer to have the props started by a trigger on the field because they do not think the wireless would be reliable enough. I think it will be, but a trigger as a back up plan might be a good idea and it would make the director happy. It will not be a super critical timing issue, just needs to be close as the sequence will be lots of dim slow fades going to full on fades with sparkles and strobes.

Thanks in advance,
Brian
« Last Edit: July 16, 2014, 08:52:33 PM by FireMedic4Christ »
Brian

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: can I start a sequence by a trigger/switch?
« Reply #1 on: July 16, 2014, 09:25:58 PM »
Not yet but adding GPIO trigger support is high on my TODO list and I have most of it thought out in my head already.  I need to pickup a breadboard so I can test things like that easier.  I will check tonight to see what else I need to pickup to test so I can get started on the code sometime soon.


-
Chris

Offline FireMedic4Christ

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Brighton, CO
  • Posts: 252
  • Kudos: 1
Re: can I start a sequence by a trigger/switch?
« Reply #2 on: July 16, 2014, 09:30:42 PM »
Just thinking out loud here:

So my only option now would be to have a computer on the sideline remote into the FPP in the prop and hit play on a saved sequence.

Thanks again,

Brian

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: can I start a sequence by a trigger/switch?
« Reply #3 on: July 16, 2014, 09:35:29 PM »
Yeah.  It could be done now using a shell or perl/python script that would monitor the GPIO pins and trigger playlists or effects if a trigger occurs, but you have to be able to script.



Offline FireMedic4Christ

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Brighton, CO
  • Posts: 252
  • Kudos: 1
Re: can I start a sequence by a trigger/switch?
« Reply #4 on: July 16, 2014, 09:40:46 PM »
I appreciate your time tonight, but I meant if I take the trigger out of the equation the only way to start a sequence on command would be for someone stationed by a computer that is connected wirelessly to the FPP and just hit play in the web console.

Brian

 
Yeah.  It could be done now using a shell or perl/python script that would monitor the GPIO pins and trigger playlists or effects if a trigger occurs, but you have to be able to script.

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: can I start a sequence by a trigger/switch?
« Reply #5 on: July 16, 2014, 09:51:20 PM »
Yes, without triggers you need someone with a computer or phone with web browser to 'trigger' the sequence by starting a playlist.



Offline David Pitts

  • Administrator
  • *****
  • Join Date: Mar 2013
  • Location: Falcon, CO
  • Posts: 3,943
  • Kudos: 80
Re: can I start a sequence by a trigger/switch?
« Reply #6 on: July 16, 2014, 09:53:23 PM »
The LCD option would work
PixelController, LLC
PixelController.com

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: can I start a sequence by a trigger/switch?
« Reply #7 on: July 18, 2014, 01:35:20 AM »
Brian, when do you need this by?  I wrote a bit of code tonight and should be able to test something tomorrow night or over the weekend.

The current code will support up to 8 GPIO Input triggers.  Each can be assigned to any Event.  The Event can trigger an effect or run a script to start a playlist.  I still need to think a little about what to do when a second trigger is initiated, but I think the basic parts of the code are ready for me to test tomorrow.

The Raspberry Pi model B has 4 more GPIO inputs that are on an optional header.  I believe the B+ will support even more and the wiringPi author has already added support for the B+ in the wiringPi library, so we should be able to suport more than 8 inputs in the future.

Offline algerdes

  • Supporting Member
  • ******
  • Join Date: Apr 2014
  • Location: Lebanon, Illinois
  • Posts: 915
  • Kudos: 13
Re: can I start a sequence by a trigger/switch?
« Reply #8 on: July 18, 2014, 08:13:12 AM »
When using the triggering like you have added, does the event started by the trigger finish even if a second trigger comes in on the line?  Will the second trigger be cached and then sent or will it be dumped?
Sequencers: Vixen3 and xLights
Players: FPP and xSchedule Controllers:  Renards - SS24/SS16; E1.31 - San Devices E682 - Falcon F16, F4, F48 - J1Sys - DIYLEDExpress E1.31 Bridges.  Much more!

Offline FireMedic4Christ

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Brighton, CO
  • Posts: 252
  • Kudos: 1
Re: can I start a sequence by a trigger/switch?
« Reply #9 on: July 18, 2014, 09:49:18 AM »
Band season starts with school in late summer. The main competition that he wants this for is in October. We would want time for the kids to work with it and the road crew to set stuff. I would think late August or early September would work for us, especially if I start designing / building without it and add it in when and if I can.

Brian

Brian, when do you need this by?  I wrote a bit of code tonight and should be able to test something tomorrow night or over the weekend.

The current code will support up to 8 GPIO Input triggers.  Each can be assigned to any Event.  The Event can trigger an effect or run a script to start a playlist.  I still need to think a little about what to do when a second trigger is initiated, but I think the basic parts of the code are ready for me to test tomorrow.

The Raspberry Pi model B has 4 more GPIO inputs that are on an optional header.  I believe the B+ will support even more and the wiringPi author has already added support for the B+ in the wiringPi library, so we should be able to suport more than 8 inputs in the future.

Offline FireMedic4Christ

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Brighton, CO
  • Posts: 252
  • Kudos: 1
Re: can I start a sequence by a trigger/switch?
« Reply #10 on: July 18, 2014, 09:51:43 AM »
In my initial plan, I have 4 separate systems located in four different areas across the field and not really related to each other.

When using the triggering like you have added, does the event started by the trigger finish even if a second trigger comes in on the line?  Will the second trigger be cached and then sent or will it be dumped?

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: can I start a sequence by a trigger/switch?
« Reply #11 on: July 18, 2014, 10:34:56 AM »
When using the triggering like you have added, does the event started by the trigger finish even if a second trigger comes in on the line?  Will the second trigger be cached and then sent or will it be dumped?

That's the part I mentioned I still need to work on.  Right now the event system can stomp all over itself, if you trigger the same event multiple times.  I need to add some logic to that to either ignore or queue the second and subsequent requests until the first is finished.  Still thinking this part over though.

EDIT: I shouldn't say that it can stomp all over itself, it won't break anything, it is just that it will run the event multiple times in parallel.  If the event plays an effect, the effect will be playing several times at the same time so only the last one is really playing/visible.  If the event runs a script, the script will get run multiple times concurrently without waiting for the first iteration to finish.
« Last Edit: July 18, 2014, 11:30:51 AM by CaptainMurdoch »

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: can I start a sequence by a trigger/switch?
« Reply #12 on: July 19, 2014, 01:33:06 AM »
Band season starts with school in late summer. The main competition that he wants this for is in October. We would want time for the kids to work with it and the road crew to set stuff. I would think late August or early September would work for us, especially if I start designing / building without it and add it in when and if I can.

I have the basic functionality working now.  I can go into the UI, toggle a GPIO input On, and assign an Event to it.  Restart FPPD, touch the screwdriver across the two nails in my home-made breadboard, and the event fires off.  My test event is just running a script, but the event could also run an effect or a script that starts a playlist.

I need to add the logic to the event code to prevent the event from firing a second time if it is already running and then I think I can probably commit it after that.  So the feature will be available real soon.

Offline FireMedic4Christ

  • Supporting Member
  • ******
  • Join Date: Mar 2013
  • Location: Brighton, CO
  • Posts: 252
  • Kudos: 1
Re: can I start a sequence by a trigger/switch?
« Reply #13 on: September 22, 2014, 07:49:15 AM »
Band season starts with school in late summer. The main competition that he wants this for is in October. We would want time for the kids to work with it and the road crew to set stuff. I would think late August or early September would work for us, especially if I start designing / building without it and add it in when and if I can.

I have the basic functionality working now.  I can go into the UI, toggle a GPIO input On, and assign an Event to it.  Restart FPPD, touch the screwdriver across the two nails in my home-made breadboard, and the event fires off.  My test event is just running a script, but the event could also run an effect or a script that starts a playlist.

I need to add the logic to the event code to prevent the event from firing a second time if it is already running and then I think I can probably commit it after that.  So the feature will be available real soon.

Just wanted to let you know the trigger function worked perfectly for the first band performance at homecoming last Friday. With lots of help from David Pitts and Sean Meighan, we were use a push button switch to trigger a playlist. The kids loved it and the crowd oohed and awed.

Thanks for your time and efforts towards these great projects!

Brian

Offline mms

  • Falcon Beta Team
  • **
  • Join Date: Mar 2013
  • Location: Lone Tree, Colo.
  • Posts: 282
  • Kudos: 2
    • Lone Tree Light Show on Facebook
Re: can I start a sequence by a trigger/switch?
« Reply #14 on: September 22, 2014, 09:32:15 AM »
That's AWESOME! 

Let us know when the next home game is, I'd love to see in person!

 

Back to top