Summary
this is an Arduino door locking device, I made this so I can lock my door while I'm at my desk.
you need:
Arduino uno
servo motor "which comes with the kit"
2 X leds 1x red 1x green
Print Settings
Printer Brand:
Prusa
Printer:
Prusa Mk2
Rafts:
No
Supports:
No
Resolution:
200
Infill:
15
Notes:
here is the sketch code used in this project.
include
Servo servo;
void setup()
{
pinMode(2,INPUT);
pinMode(4,INPUT);
servo.attach(10);
servo.write(0);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
}
void loop()
{
if(digitalRead(2)==HIGH)
{servo.write(0);
digitalWrite(7,LOW);
digitalWrite(8,HIGH);
}
if(digitalRead(4)==HIGH)
{servo.write(90);
digitalWrite(7,HIGH);
digitalWrite(8,LOW);
}
}
Tags
Modellquelle
