Rotary Phone that opens a lock (willing to pay through paypal)

I just purchased an Arduino and have no clue how to use it willing to pay for work on this project here is what I need:

Rotary Phone dial needs to communicate with Arduino and either trigger a lock to open a door or trigger a light preferably unlock a door. The user must dial the 7 digit code and the Arduino will trigger the lock.

I need the source code for everything because my C++ is super rusty.

Also needed is how to wire everything up from phone to Arduino to lock.

I have seen this done before with this device and know its possible but haven't had the knowledge to do it.

Will give reasonable payment through paypal account.

Counting pulses from a telephone dial is no problem and activating a relay (or just lighting a led) if the right sequence is detected is also not difficult. Have you thought about how you would enter the secret code number in the first place ? Embedding it in the sketch ? entering it through the telephone dial ? You'd also have to thing about timeouts in case say someone gives up entering digits halfway through, so the lock system is left in a known state for the next person.

I’ve replied to your PM, but on looking around, you may have a ready made solution here:

I hope that you can have some success with this. Read the comments at the top. Experiment with the dialer to discover which wires are relevant. The LED will pulse during dialing.

/*

   Telephone Dial Interpreter and Game
   LED - pin 13
   Dialer - between pin 2 and ground assuming dialer is NC (normally closed)
   Note: currently written to support a NC dialer. 
   Note: currently supports a dialer with a dialed 0 giving 1 pulse
   Note: alter magicNumberSize && magicNumber to suit.
   You may have to experiment with the timings depending on the dialer.
   
*/

const unsigned long dialingSessionTimeOut = 10000UL ;  // 10 seconds of no activity
const unsigned long singleDigitDialTimeOut = 1000UL ;   // 2000 mS of no activity
const unsigned long contactDebounce = 50UL ;
const unsigned long successPhaseDuration = 10000UL ;  // how long LED (relay) etc. is activated  if success.


const int magicNumberSize = 7 ;  // number of digits to be dialed
const int magicNumber[ magicNumberSize ] = { 1, 2, 3, 4, 5, 6, 7 } ;  // digit sequence to be dialed

const byte ledPin = 13 ;
const byte dialPin = 2 ;

bool inDialingSession = false ;
bool inSingleDigitDial = false ;
bool inSuccessPhase = false ;

unsigned long pulseReceivedAtMs = 0 ;
unsigned long successPhaseStartedAtMs = 0 ;

int numberOfPulsesReceivedForCurrentDigit = 0 ;
int currentDigitIndex = 0 ;
bool dialPinLast;
bool dialPinCurrent ;
int collectedDialedDigit[ magicNumberSize ] ;   // here are our results


void setup() {
  Serial.begin( 9600 ) ;
  pinMode( ledPin, OUTPUT ) ;
  pinMode( dialPin, INPUT_PULLUP ) ;  // external pullup/down depending on dial  NC = pullup, NO = pulldown
  dialPinLast = digitalRead( dialPin ) ;
  Serial.println( "Dialer Game Starting. . . " ) ;
}

void loop() {

  if ( inSuccessPhase ) {
     if ( millis() -  successPhaseStartedAtMs < successPhaseDuration ) {
        digitalWrite( ledPin, HIGH ) ;
        // put code to hanle unlocking / relay etc. here
     }
     else {
         digitalWrite( ledPin, LOW ) ;
         inSuccessPhase = false ;
         Serial.println( "End of SUCCESS period" ) ;
     }
  }

  if ( inDialingSession ) digitalWrite( ledPin, digitalRead( dialPin ) ) ;  // flash led with dial pulses

  if ( inDialingSession && millis() - pulseReceivedAtMs > dialingSessionTimeOut ) {
    // abandoned session - cleanup
    inDialingSession = false ;
    inSingleDigitDial = false ;
    numberOfPulsesReceivedForCurrentDigit = 0 ;
    Serial.println( "Dialing Session Timeout reached" ) ;
  }

  if ( inSingleDigitDial && millis() - pulseReceivedAtMs > singleDigitDialTimeOut ) {
    // dialling of current Digit has ended

    // Only one line below should be active depending on the type of dial uses:

    // Case 1:  a dialed 0 gives 1 pulse, then subtract 1 for all digits
    numberOfPulsesReceivedForCurrentDigit -- ;

    // Case 2:  a dialed 0 delivers 10 pulses
    // if ( numberOfPulsesReceviedForCurrentDigit == 10 ) numberOfPulsesReceviedForCurrentDigit = 0 ;

    Serial.println () ;
    Serial.print ("Digit " ) ;
    Serial.print ( currentDigitIndex ) ;
    Serial.print ("; pulses received= " ) ;
    Serial.println ( numberOfPulsesReceivedForCurrentDigit ) ;

    collectedDialedDigit[ currentDigitIndex ] = numberOfPulsesReceivedForCurrentDigit ;
    if ( currentDigitIndex + 1 == magicNumberSize ) {
      // we have all our digits 0..6 so teminate session
      Serial.println ( "Terminating Current Dialing Session" ) ;
      inDialingSession = false ;

      bool success = true ;
      for ( int i = 0 ; i < magicNumberSize ; i++ ) {
        if ( magicNumber[ i ] == collectedDialedDigit[ i ] ) {
          Serial.print("digit: " ) ;
          Serial.print( i + 1) ;
          Serial.println (" matched magic number" ) ;
        }
        else {
          Serial.print("digit: " ) ;
          Serial.print( i + 1 ) ;
          Serial.println (" did NOT match magic number" ) ;
          success = false ;
        }
      }
      if (success) {
        Serial.println ("SUCCESS" ) ;
        inSuccessPhase = true ;
        successPhaseStartedAtMs = millis() ;
      }
      else {
        Serial.println ("FAILURE" ) ;
      }
      Serial.println () ;
      Serial.println () ;
      Serial.println () ;

      // check here if it was a success
    }

    inSingleDigitDial = false ;
    currentDigitIndex++ ;
  }

  dialPinCurrent = digitalRead( dialPin) ;
  if ( dialPinCurrent != dialPinLast && dialPinCurrent == HIGH && millis() - pulseReceivedAtMs > contactDebounce ) {

    if ( ! inDialingSession ) {
      Serial.println()  ;
      Serial.println()  ;
      Serial.println( "Start new dialing session") ;
      inDialingSession = true ;
      // startOfDialingSessionMs = millis() ;
      currentDigitIndex = 0 ;
      inSingleDigitDial = false ;  // force cleanup
    }
    if ( ! inSingleDigitDial ) {
      Serial.println() ;
      Serial.println( "Start new single digit") ;
      inSingleDigitDial = true ;
      numberOfPulsesReceivedForCurrentDigit = 0 ;
    }
    Serial.println ( "dial pulse received" ) ;
    pulseReceivedAtMs = millis() ;
    numberOfPulsesReceivedForCurrentDigit ++ ;
  }
  dialPinLast = dialPinCurrent ;
}

Anyone else looking for an answer to this question might find the following guide helpful: https://www.patreon.com/posts/call-me-rotary-18574790

Hey GRS,

I develop escape room games and have dozens of rotary and touch tone phone props (makes realistic sounds, open locks, play special messages, receive calls, etc.)

I’ll shoot you a PM with specifics.

For the rest of you... feel free to contact me directly at: phennessey@eng.tamarcove.net

Pat.