Great work Mary.... And just in time!
Opto just got its set of Google Glasses.
They have been making their way around the company and its my turn to play with them for a few days.
I wanted to set myself the task of getting a message from the Google Glass onto the LED marque board I have in my garage (as you do).
Since the LED board is already hooked to a PAC Controller, I can log into my groov and type a message and it will get scrolled across a thousand or so LED's.
The trick then is to link the Google Glass to that PAC Controller.
I figured Marys Dropbox trick was the go.
First thing I had to do was move the strategy off the PAC S controller and put it on a SoftPAC. The PAC S and PAC R controllers can not access a Dropbox, only the SoftPAC can do that (since its on the same computer as the Dropbox, its like its a local file).
Once I moved that, I made a recipe on IFTTT.
The recipe is that a text message to their phone number from my phone number will write a text file to my DropBox.
Since the Google Glass is linked to my phone, if I send a text from the Glass, it ends up as text on my Dropbox.
I tested it a few times, and it seems pretty quick and solid.
So, now to get the SoftPAC strategy to check the Dropbox file, and move it into a string, then delete the file.
Here is the code to do that.
// check the dropbox for any messages that may have come in from google glass or text.
// define 'file_dropbox' as the following in your strategy tree.....
sms_status = OpenOutgoingCommunication(file_dropbox);
// If there is a file, then open it and get the guts of it.
if (sms_status == 0) then
//pull the contents of the file into a table.
sms_status = ReceiveStrTable(1, 0, sms_data_table, file_dropbox);
// Ok, we got the file contents, delete the file so IFTTT can make the same file next time.
sms_status = SendCommunicationHandleCommand(file_dropbox, "delete");
// now send the string to the LED sign.
led_sign_string_from_web = sms_data_table;
My Dropbox is on my E drive, so that's why the drive letter is what it is (my C: drive is an SSD and it does not have the space for the Dropbox).
So, here is the process (I plan to make a little video of this over the weekend if I get time).
You wake up Google Glass by tapping the side or tilting your head back.
Say "Ok glass".
"Send a message to".
"If this" (I made a contact called 'if this' with their magic phone number in it).
"This is a test message for the led sign" (Or what ever you want scrolled).
At that point, you just wait about 5-8 seconds, and Bam. Your message scrolls.