[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5312: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3925)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5312: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3925)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5312: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3925)
Web hooks and connecting to electronics? - Field Day Forums
Web hooks and connecting to electronics?
  • User avatar
    chrish
    Posts: 250
    Joined: Mon Oct 10, 2016 5:45 pm
    Location: Albuquerque, NM
    Contact:

    Web hooks and connecting to electronics?

    by chrish » Fri Apr 07, 2017 6:57 pm

    I remember a while back a demo of an internet controlled gong being activated by ARIS through the magic of arduino and web hooks. Hobby computing has come a long way since then and at least MNHS uses similar electronics in the real world --- ARIS connections so it seems like this would be a fun new avenue of AR game development to play with. I've been getting my own little mini computer up and running, a $9 CHIP, and ready to take the next steps.

    It runs linux, has libraries for running its GPIO pins, and wifi. Anyone have an idea about how I might begin having ARIS talk to this computer through the internet or where to start looking? Anyone have anything that's already working that I could copy-paste?
  • User avatar
    djgagnon
    Site Admin
    Posts: 133
    Joined: Tue Sep 20, 2016 10:52 pm
    Location: Madison, WI
    Contact:

    Re: Web hooks and connecting to electronics?

    by djgagnon » Fri Apr 07, 2017 10:27 pm

    I don't have time for an in depth here, but the secret sauce for us was using the pusher library for Arduino/rPi combined with javascript events in ARIS. All the MHS code is live on gitHub for samples. If there is interest, I'd be happy to do this as a workshop/course at some point.
  • User avatar
    chrish
    Posts: 250
    Joined: Mon Oct 10, 2016 5:45 pm
    Location: Albuquerque, NM
    Contact:

    Re: Web hooks and connecting to electronics?

    by chrish » Mon Apr 10, 2017 4:19 pm

    Thanks, I was hoping to be able to muddle along and if I got somewhere, lay down the equivalent of a game trail that others might follow. I think knowing "pusher library" should get me started in the right direction.
  • User avatar
    djgagnon
    Site Admin
    Posts: 133
    Joined: Tue Sep 20, 2016 10:52 pm
    Location: Madison, WI
    Contact:

    Re: Web hooks and connecting to electronics?

    by djgagnon » Wed Apr 12, 2017 11:39 pm

    Chris,

    If you or anyone else is interested, it could be fun to host a little online hangout on the topic. I recently read this great paper on the topic of Mixed Reality bringing AR plus Internet of Things devices and I'd love to see more folks explore. Websocket based communications (Pusher is an example that makes it easy) are at the heart of how to pull it off in realtime.

    David
  • User avatar
    chrish
    Posts: 250
    Joined: Mon Oct 10, 2016 5:45 pm
    Location: Albuquerque, NM
    Contact:

    Re: Web hooks and connecting to electronics?

    by chrish » Thu Apr 13, 2017 3:58 pm

    I would definitely be interested in that. A little help to get started would really make things smoother. I am becoming comfortable with setting up OS and software on these little linux boxes and getting little bits of code together to work with pinouts and other io (like audio). I've done a bit of JS in my other ARIS games. In both cases, having the basic idea down and being able to start from someone else's functioning work, advanced copy-paste, makes it easy to get far while not knowing all of the details behind the system.

    Here, I know that on the target device, I would need a bit of code to run that would connect to the ARIS server somehow, take in a couple values there and then pass them on to pinouts on the device. I would also need to make additions to my ARIS game (in the form of JS in an event or other object?).

    I've read enough about pusher in its documentation and playing around in the MHS files to get a sense of what that code looks like, but there are some basics I'm still not sure of in a way that prevents me from going further until I pick up more. I was also checking out the stuff in ARIS/Arduino but that seemed old. I do have some arduinos handy but one of the neat things about the devices that run linux (RPi, CHIP, etc.) is how they are full typical computers that happen to have pinouts. You often don't need any extra hardware to connect to the network or load them.

    One thing that makes it difficult to interpret pusher documentation is that they assume the reader is setting everything up, not plugging into an existing set up. I'm guessing that on the embedded device we would use the client JS library, but would we go about this by installing a web server on that device and then creating a page that would host the code? Or would there be something like loading a python script on boot that was listening on a port? I'm also not certain what the additions to events or other objects would be, or if there are other ways to put this code into an ARIS game.

    It may be too that my estimation of how graspable this stuff is is off, but I'm ready to keep at it for a while.
  • User avatar
    chrish
    Posts: 250
    Joined: Mon Oct 10, 2016 5:45 pm
    Location: Albuquerque, NM
    Contact:

    Re: Web hooks and connecting to electronics?

    by chrish » Tue Apr 18, 2017 1:59 pm

    I think one thing that holds me up here and with other features that are not yet very documented, like how to use JS with buttons, is that while I have the code available on GitHub, I can't look at a game that has these features in the editor. There are no QA builds that I have which are associated with these features, the existing ARISJS documentation explains what the code is but not fully where it may exist (see the plaque button topic in this same forum section). Maybe some of these are only in place in the MHS game.

    On this same topic, and maybe of more general interest, I'd like to produce and advertise such sample games for other features so that, for instance, things I know how to do in ARIS I can share the working game with people that they can then dig around in and mess with. For now, one off sharing will have to do, but one development we could really use funding support to make happen would be a better sharing of games between authors. Scratch and Google Docs are conceptually very good models to copy there.

    But I could get started if I knew what features, mechanics, etc. people would like to see demonstrated in that fashion.
  • User avatar
    chrish
    Posts: 250
    Joined: Mon Oct 10, 2016 5:45 pm
    Location: Albuquerque, NM
    Contact:

    Re: Web hooks and connecting to electronics?

    by chrish » Fri Apr 21, 2017 12:23 pm

    I wonder if anyone has seen or used node red: . It is a browser based utility for connecting API's, GPIO, and online services. It's based on node.js
  • User avatar
    chrish
    Posts: 250
    Joined: Mon Oct 10, 2016 5:45 pm
    Location: Albuquerque, NM
    Contact:

    Re: Web hooks and connecting to electronics?

    by chrish » Fri Apr 21, 2017 12:56 pm

    And it looks like this guy has done a lot of work to create a simple script that will talk to node red on many of the boards out there:



    I don't know a lot yet, but maybe this gets us close to having a plug-and-play software install on a small board like a RPi with GPIO and a easy to use environment for hooking that up to web services.
  • User avatar
    chrish
    Posts: 250
    Joined: Mon Oct 10, 2016 5:45 pm
    Location: Albuquerque, NM
    Contact:

    Re: Web hooks and connecting to electronics?

    by chrish » Fri Apr 21, 2017 6:27 pm

    Johnny Five io claims to be a SBC (single board computer) platform for doing IO with JS. Since I have a CHIP for instance, I would install johnny five io along with chip-gpio (specific JS for controlling GPIO on my board) and node red (the graphical programming environment for creating connections between the board and APIs or other web services.



    Here is an interesting tutorial involving all three pieces and using http requests to change GPIO states:



    There is also a Pusher node for Node Red:

  • User avatar
    djgagnon
    Site Admin
    Posts: 133
    Joined: Tue Sep 20, 2016 10:52 pm
    Location: Madison, WI
    Contact:

    Re: Web hooks and connecting to electronics?

    by djgagnon » Sun Apr 23, 2017 3:52 pm

    This is a great find Chris!

    node red looks like a generalized version of the "show controller" app I was writing a few years ago.

    Optimally, the system would take a few inputs:

    pusher events
    GPIO pins going high/low
    receive a web hook

    And then be able to do the following commands in a timed "sequence":

    wait
    AV start/stop
    push GPIO pins high/low
    send a pusher event
    send a web hook

    To get more general, sending receiving MIDI and DMX would help the pros.

    node red looks like it might be able to do all this.



    David