Page 214 - Tasarım Beceri Atölyeleri Öğretmen El Kitabı
P. 214

#define buzzer 8
               #define trigPin 9
               #define echoPin 10



               long duration;
               int distance, initialDistance, currentDistance, i;
               int screenOffMsg =0;
               String password=”1234”;
               String tempPassword;
               boolean activated = false; // State of the alarm
               boolean isActivated;
               boolean activateAlarm = false;
               boolean alarmActivated = false;

               boolean enteredPassword; // State of the entered password to stop the alarm
               boolean passChangeMode = false;
               boolean passChanged = false;


               const byte ROWS = 4; //four rows
               const byte COLS = 4; //four columns
               char keypressed;
               //define the cymbols on the buttons of the keypads
               char keyMap[ROWS][COLS] = {
                 {‘1’,’2’,’3’,’A’},
                 {‘4’,’5’,’6’,’B’},

                 {‘7’,’8’,’9’,’C’},
                 {‘*’,’0’,’#’,’D’}
               };







           206
   209   210   211   212   213   214   215   216   217   218   219