Sending text to Photon

How do I go about sending plain text to photon that will be passed to a Parallax Emic 2 Text to Speech Module thence to a small loudspeaker in a Teddy Ruxpin bear.
This will be similar to the project in Make magazine that uses the not yet available CHIP board.
My intent is to type text in a laptop or cell phone connected to the cloud.

Reading the docs never hurts…

Thank you Moors. Yours is good advice.
For this old guy with a weak brain, this will take some time.
A few suggestions for me to research would help.

There’s a neat tutorial in functions over here that has helped me in the past: Tutorial: Spark Variable and Function on One Web Page

Here’s a small demo:

void setup() {
    Particle.function("passText", handleText);

void loop() {


//Normally you should keep this as short as possible.
//For simplicities sake, I've put it in the function handler.
//in real-life, but it in the loop, and only set a 'flag' here.
int handleText(String actualText){
    Particle.publish("eventNameHere", actualText);
    return 0;

Put that on your device. Then, log in over here. You should see your devices, their variables and functions. Click on the blue button on the bottom, and keep both pages open. Then, on the first page, enter something in the “passText” function, and click send. You should then see that pop up in the second screen :smile:

1 Like