Things used in this project

Hardware components:
Photon new
Particle Photon
×1
 0000s 0004 facing left
Pebble Watch
×1
10804 01
SparkFun Breadboard Power Supply Stick 5V/3.3V
×1
Software apps and online services:
Q8wtlimqnp04fzhtr9v5
IFTTT Maker service
Particle IDE

Code

Particle Photon Switch codeArduino
int controlLed(String command);

void setup()
{
  pinMode(7, OUTPUT);
  digitalWrite(7,LOW);
  // register the cloud function
  Particle.function("particle", controlLed); // the name of function on IFTTT
}

void loop()
{
  // this loops forever
}

// this function automagically gets called upon a matching POST request
int controlLed(String command)
{
  // look for the matching argument "coffee" <-- max of 64 characters long
  if(command == "on")
  {
    digitalWrite(7,HIGH);
    return 1;
  }
  else if(command == "off")
  {
    digitalWrite(7,LOW);
    return 1;
  }
  else return -1;
}

Credits

H5vc9pdmkdz8vtgljke9
Giovanni Gentile

Graduated in Psychology expert in new technologies and communication, with expertise in electronics, automation and home automation.

Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

ConnectTheDots with Particle Azure IoT Hub Integration
Intermediate
  • 563
  • 7

Protip

This project will allow you to connect your Particle device into an Azure IoT Hub for viewing data in real-time through an ASP.NET web app!

Other Clocks
Intermediate
  • 186
  • 3

Work in progress

A combination of 3 different clocks in one frame.

Christmas Gift Box
Intermediate
  • 3,602
  • 595

Full instructions

Christmas Gift Box plays music and sends an email when it is opened.

Weather Aware Sprinkler Controller
Intermediate
  • 1,301
  • 16

Full instructions

6 station Photon controller uses the Weather Underground API to prevent watering when windy, rainy, or too cold.

Simple Environmental Monitoring
Intermediate
  • 1,558
  • 13

Full instructions

Particle Photon circuit allowing the display of environmental conditions (light, temperature, humidity, pressure) using the Blynk app.

THDweeter
Intermediate
  • 249
  • 2

Protip

Yet another temperature-humidity sensor publishing to dweeter, with WiFi auto-disconnect and a push button to read daily max and min values.

Add projectSign up / Login