 const unsigned long telnetInputMax = 128;           // Size of user input buffer for user telnet session
 bool motionEnabled = false;                         // Motion sensor is enabled
 bool mdnsEnabled = true;                            // mDNS enabled
-bool beepEnabled = true;
+bool beepEnabled = true;                            // Keypress beep enabled
+unsigned long previousMillis = 0;                   // will store last time beep was updated
+long OnTime = 1000;                                 // milliseconds of on-time
+long OffTime = 1000;                                 // milliseconds of off-time
+boolean beepState;                                  // will store beepState true or false
+unsigned int beepCounter;                           // Count the number of beeps
+byte beepPin;                                       // define beep pin output
 uint8_t motionPin = 0;                              // GPIO input pin for motion sensor if connected and enabled
 bool motionActive = false;                          // Motion is being detected
 const unsigned long motionLatchTimeout = 30000;     // Latch time for motion sensor

String mqttStatusTopic;                             // MQTT topic for publishing device connectivity state
String mqttSensorTopic;                             // MQTT topic for publishing device information in JSON format
String mqttLightCommandTopic;                       // MQTT topic for incoming panel backlight on/off commands
String mqttBeepCommandTopic;                         // MQTT topic for error beep 
String mqttLightStateTopic;                         // MQTT topic for outgoing panel backlight on/off state
String mqttLightBrightCommandTopic;                 // MQTT topic for incoming panel backlight dimmer commands
String mqttLightBrightStateTopic;                   // MQTT topic for outgoing panel backlight dimmer state

      mqttClient.publish(mqttStateJSONTopic, mqttButtonJSONEvent);
      if (beepEnabled)
      {
      OnTime = 500;                                
      OffTime = 100;
      beepCounter = 1;
      }
      
    }
