engineerkid
Published

Contactless hand sanitizer dispersal

How to build contactless hand sanitizer dispersal

BeginnerProtip2 hours1,513

Things used in this project

Hardware components

Arduino uno
×1
IR sensor
×1
jumper wires
×1
Servo motor
×1
Bread board
×1
steel wires
×1
Soap disposal
×1
UTSOURCE Electronic Parts
UTSOURCE Electronic Parts
×1

Story

Read more

Schematics

untitled_sketch_bb_9wGZI70E0p.jpg

Code

code.ino

Arduino
#include <Servo.h>
Servo myservo;
Servo myservo1;
void setup() {
  pinMode(7, INPUT);
  myservo.attach(9);
  myservo1.attach(10);

}

void loop() {
  if(digitalRead(7)==LOW)
  {
  myservo1.write(130);
  myservo.write(0);
  }
  else
  {
  myservo1.write(0);
  myservo.write(130);
  }
}

Credits

engineerkid

engineerkid

13 projects • 0 followers
How To Protect Yourself From Coronavirus click above link☝☝☝

Comments