 
 void ringStart()
 {
+    ringingState = true;
+    ringingTimmer = millis();
     analogWrite(RINGER,128);
+    ringingStage = 1;
 }
 
 void ringStop()
 {
+    ringingState = false;
     analogWrite(RINGER, 0);
-}
-
-
-/*
-void keypadEvent(KeypadEvent key){
-  switch (keypad.getState()){
-    case PRESSED:
-      switch (key){
-        case '#': digitalWrite(ledPin,!digitalRead(ledPin)); break;
-        case '*': 
-          digitalWrite(ledPin,!digitalRead(ledPin));
-        break;
-      }
-      break;
-    case RELEASED:
-      switch (key){
-        case '*': 
-          digitalWrite(ledPin,!digitalRead(ledPin));
-          blink = false;
-        break;
-      }
-      break;
-    case HOLD:
-      switch (key){
-        case '*': blink = true; break;
-      }
-      break;
-  }
-}
-*/+}
uint8_t hookState = 0;
uint32_t hookTimeOut = 0;
uint8_t followState = 1;


void setup()

#define RINGER 11

#define HOOK_TIMEOUT 5
#define RING_ON_TIME 400
#define RING_OFF_TIME 200


int8_t incoming;
volatile uint8_t newHookState = 0;
