Advertisement
Fahim_7861

code1

Feb 15th, 2021
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1.  
  2.  
  3. #include<Servo.h>
  4. #include<Keypad.h>
  5.  
  6. Servo ServoMotor;
  7.  
  8. char* password ="888";
  9.  
  10. int position=0;
  11.  
  12. const byte ROWS=4;
  13. const byte COLS=4;
  14.  
  15. char keys[ROWS][COLS]={
  16.  
  17. {'1','2','3','A'},
  18.  
  19. {'4','5','6','B'},
  20.  
  21. {'7','8','9','C'},
  22.  
  23. {'*','0','#','D'},
  24.  
  25.  
  26. };
  27.  
  28. byte rowPins[ROWS]={8,7,6,9};
  29. byte colPins[COLS]={5,4,3,2};
  30.  
  31. Keypad keypad =Keypad{makeKeymap(keys),rowPins,colPins,ROWS,COLS);
  32.  
  33. int RedpinLock=12;
  34. int GreenpinUnlock=12;
  35.  
  36.  
  37. void setup() {
  38. // put your setup code here, to run once:
  39.  
  40. ServoMotor.attack(11);
  41.  
  42. LockedPosition(true);
  43.  
  44. }
  45.  
  46. void loop() {
  47. // put your main code here, to run repeatedly:
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement