How do you convert google paper signal into particle?

any particle google paper signal Github?!?

1 Like

Nice signals :+1:

What have you tried?
https://docs.particle.io/reference/firmware/photon/#servo
https://docs.particle.io/reference/firmware/photon/#particle-function-
https://docs.particle.io/reference/firmware/photon/#particle-subscribe-

1 Like

Neat!

I would like to see this working with the Photon.

I looked at the Arduino code in the link, and I don't think you can use it directly, since the app needs to communicate with Google using an Https connection (which isn't easy to do directly on a Particle device).

I think the easiest way to add voice control to a Particle based project is to use IFTTT. They have an integration with Google Assistant, so you can easily add a voice command to trigger a function call or publication. I set one up using the simple command, "execute $ using #". The $ is a stand in for a word, and the # is a placeholder for a number. The "then" part of the applet is to execute the function, setState, on one of my devices. The String argument to that function will be the number you say followed by a space, then the word you say. Using the Google Assistant app on my phone, if I say, "hey Google" followed by "execute close using 72", I get the following result,

The number is: 72 and the word is: close

with this code on my Photon,

void setup() {
    Particle.function("setState", setState);
    Serial.begin();
}

void loop() {}

int setState(String cmd) {
    char* args = (char*)cmd.c_str();
    int num = atoi(strtok(args, " "));
    char* word = strtok(NULL, " ");
    Serial.printlnf("The number is: %d and the word is: %s", num, word);
    return 1;
}

You can then use that word and number to control any number of physical devices that you have connected to your Particle device.

3 Likes