0

calculating incoming gpio input triggers

hi all,

I would like to know how to calculate the amount of incoming gpio input triggers within a given time lets say 5 min. With that result i would like to send that data to a second computer or website. what is the direction i need to go ?

kind regards,

Ian

12 comments

  • 0
    Avatar
    Eric

    First setup a variable counter. Each time a trigger is received increase the variable number.

    Second I would use an Eventhandler with time out 5min. Every 5 minutes it would send a UDP message to a web platform with the amount of variables counted.

    For me I have the advantage of using a CMS cloud platform SigncastFeeds that can receive the UDP messages and log them.

  • 0
    Avatar
    Ian Cassels

    aye got the counter setup. Can i do also calculations ?

     

    i only see UDP input ...where can i output UDP values ?

  • 0
    Avatar
    Eric

    I did not do, or have experience with, calculations. I thinks this requires scripting. Enclosed an image on the UDP output. You have to setup destination address in the Presentation Properties - Interactive tab.

  • 0
    Avatar
    Ian Cassels

    so the counter variable is the name of the counter with $ like in PHP ?

  • 0
    Avatar
    Ian Cassels

    thx for all the help bytheway :)

  • 0
    Avatar
    Eric



    Thnx! Sorry needed 2x$ symbol. So, $$variable_name$$. See enclosed images.

  • 0
    Avatar
    Ian Cassels

    aaaa ok thx

  • 0
    Avatar
    Ian Cassels

    i can send data coming other programm but looping the time out is not working

  • 0
    Avatar
    Eric

    That should be easy, see enclosed image. By the way, are you from R'dam? 

  • 0
    Avatar
    Ian Cassels

    hahahahahah you got the right one :)

  • 0
    Avatar
    Bright Scripters

    Hi Ian and Eric

    You can increment a variable on a schedule, and you can also reset the counter. Here is how:

    You could send an HTTP request to the remote server, and submit the counter value as part of the HTTP request URL. Now how do you generate an HTTP request?

    You could create a fake data feed with a URL such as http://MyRemoteServer.com/myStatsScript.php?$$counter$$

    I think that should work... :)

    You would then refresh the fake feed, once in every 5min like so

    If you have multiple players that you need to track individually, then your URL would pass the player's ID also like

    http://MyRemoteServer.com/myStatsScript.php?$$playerSerial$$&$$counter$$

     

    playerSerial would be defined like so:

    I hope that helped

     

  • 0
    Avatar
    Ian Cassels

    ow thx :)

     

Please sign in to leave a comment.