Things used in this project

Hardware components:
Photon new
Particle Photon
×2
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)
×3
Software apps and online services:
Q8wtlimqnp04fzhtr9v5
IFTTT Maker service
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

Poor Man's CAN Bus
Easy
  • 39
  • 3

Protip

Learn how to connect microcontrollers together using the CAN bus by using a simple AND gate

Cloud based temperature logger for homebrew fermenter
Easy
  • 168
  • 5

Work in progress

Using battery powered NodeMCU v2 and DS18B20 thermometer to log temperature and system voltage on Google Sheets.

MyPIR-Sensor activate analog RGB Stripe controlled by Photon
Easy
  • 30
  • 1

Full instructions

At my age you have to get up at night and get tired on the way to the bathroom. Using a PIR-Sensor to trigger light on!

Wireless IoT Door Open/Closed Sensor
Easy
  • 790
  • 11

Full instructions

Using the built-in reed switch on the mcMod120, we'll show you how to setup a super easy way to be alerted and track opening doors!!

Weather Box
Easy
  • 2,137
  • 11

Full instructions

Small weather station that uploads to Weather Underground with a NeoPixel ring for visualization.

Washer/Dryer Monitor
Easy
  • 547
  • 5

Full instructions

Monitor your appliance's power indicator with a photocell for easy notifications without high voltage wiring.

ProjectsCommunitiesContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Respect project
Feedback