Okay! So, for this step, I learned how to trigger Scouts without using our HQ or
a wired connection -- via our REST API, a system that enables you to send commands directly from any website or app.
One way to do it is by building a simple URL, then hitting via a web browser:
Here's the breakdown on that:https://api.pinocc.io/v1
-- The stub to access the REST API./2/3
-- This means that you're addressing Scout #3 (Buckaroo, who was the third configured) in troop #2 (the Blue Blaze Irregulars). Sharp-eyed readers may note that this structure is part of the URL for the HQ page I was using earlier: https://staginghq.pinocc.io/troops/2/scouts/3/command/led.torch
-- What you want the board to do. In this case, the command tells the scout to turn the built-in LED to its "torch" color (a signature color that you can customize for each board).?token=YOURTOKEN
-- Most REST APIs require authentication in order to control access. I wouldn't want just anybody to be able to jump on the internet and mess with my Scouts. As an alternative to logging in, you can include this token with your command to authenticate.
Here's a somewhat awkward video
of me demonstrating this with the "tickle" function. :)PHONE IT
I wanted to try building an Android app to hit this from my phone, but that turned out to be kind of heinously complex for my basic needs, so I'm saving it for later. Instead, I built a simple HTML page that shows the Pinoccio logo and a "Tickle!" button, and triggers "tickle" for Tommy when either is clicked. Here's the code.
I saved this as an icon on my home screen, but during testing, it turned out to be too annoying to open the page, wait for it to load, then click again to send the REST command. So, in the end, I simply put a link to the REST URL on my home screen. Clicking that pulled up the page and triggered the function on Tommy.
Finally, time to get my hands dirty and build the Apparatus!