sarthak sethi
Published

Control any Device with your Hand!

Shake your hand and switch on your devices!

IntermediateFull instructions provided1,216

Things used in this project

Hardware components

Photon
Particle Photon
×1
IR LED
×1
3 mm LED: Green
3 mm LED: Green
×1
Relay switch
×1
Solderless Breadboard Half Size
Solderless Breadboard Half Size
×1

Story

Read more

Schematics

Device connected with Relay (Can be fan, lights etc)

Code

code.c

Arduino
int relay = D0;

void setup(){
  pinMode(relay, OUTPUT); 
pinMode(A0, INPUT);
}
void loop(){
if(analogRead(A0) > 0)  // if IR receiver LED detects a ray
{  digitalWrite(relay, HIGH);    delay(10000);              }
}

Credits

sarthak sethi

sarthak sethi

11 projects • 54 followers

Comments