Things used in this project

Hardware components:
Photon new
Particle Photon
×1
Shadow Box
×1
SparkFun Servo Motor
×1
Mfr 25fbf52 221r sml
Resistor 221 ohm
×1
09590 01
LED (generic)
×1
11026 02
Jumper wires (generic)
×1
Software apps and online services:
Q8wtlimqnp04fzhtr9v5
IFTTT Maker service
Google Developers Google Calendar

Schematics

Breadboard Schematic for Particle 1
Seuuklaixj8op9y71aus
Breadboard Schematic for Particle 2
2vcpfk4rij0ycdscw3d0

Code

Particle 1 CodeC/C++
This particle receives the variable "Yes5765776" from IFTTT when there is an event coming up on Google Calendar. When the variable is received, it tells the servo to move its hand to the "yes" position. When there is no assignment coming up, it rests in the "no" position.
int servoPin = D0;
Servo myservo;
int servoPos = 0;
void setup() {
    myservo.attach( D0 );
Particle.subscribe("Yes576577", myHandler);
}

void loop()
{}
  
void myHandler(const char *event, const char *data)
{
    if(strcmp(data,"Yes")==0)
    {
        Particle.publish("led576577", "Blink")
myservo.write(45);
delay(5000);
myservo.write(0);
}
}
Particle 2 CodeC/C++
This code receives variable from particle 1 and turns on LED when an event is received.
int led = D0;


void setup() {
digitalWrite(led,LOW);
Particle.subscribe ("Yes", myHandler);
pinMode (led, OUTPUT);
digitalWrite(led,HIGH);
delay(5000);
 digitalWrite(led,LOW);
}

void loop() {


}

void myHandler(const char *event, const char *data)
{
    if(strcmp(data,"Blink")==0) {
         digitalWrite(led,HIGH);

  
}
   else{
   }   
  }

Credits

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

IoT Alcohol Tester
Easy
  • 1,726
  • 14

Full instructions

This project explains how to build a device for estimating blood alcohol content from a breath sample.

Security+ 2.0 MyQ garage door opener
Easy
  • 20
  • 0

Full instructions

Interface newer garage door openers with more than a relay.

Temperature and humidity monitor
Easy
  • 277
  • 2

Full instructions

This is a project that uses SHT30 to get the current temperature and humidity. And then displays it on a no-chip embeded LCD.

Measuring temperature and humidity with Particle Photon
Easy
  • 426
  • 3

Full instructions

Measure temperature and humidity with Particle Photon and Adafruit Si7021 using the Adafruit Si7021 library for I2C based communication.

Automatic garage door opener using geolocation on Android.
Easy
  • 525
  • 2

Full instructions

Control and monitor your garage door remotely and open it automatically when approaching your house using geolocation.

Chromebook Enrollment
Easy
  • 972
  • 11

Work in progress

For work every now and then I have to enroll up to 200 Chromebooks/Chromebits/Chromeboxes, so I wrote a script that does just that.

Add projectSign up / Login
Respect project