This is an old restoration project of an old battleship phone which I retrofitted with an Arduino UNO and a BCD MP3 player module. The front of the phone has a selector switch which I tied to the inputs of the Arduino which then sends a BCD code to the MP3 module to select audio from one of the 12 positions. The audio I selected for each of the 12 positions is a different SIT tone (Situation Information Tone) used by the landline phones, you may recall what it is with the tones you hear when you mis-dial or no one is at the phone number you called. Two of the 12 samples are attached below.
//INPUTS const int ssp01 = 21; //selector switch position 1 const int ssp02 = 22; //selector switch position 2 const int ssp03 = 23; //selector switch position 3 const int ssp04 = 24; //selector switch position 4 const int ssp05 = 25; //selector switch position 5 const int ssp06 = 26; //selector switch position 6 const int ssp07 = 27; //selector switch position 7 const int ssp08 = 28; //selector switch position 8 const int ssp09 = 29; //selector switch position 9 const int ssp10 = 30; //selector switch position 10 const int ssp11 = 31; //selector switch position 11 const int ssp12 = 32; //selector switch position 12 const int LED33 = 33; //Busy LED 33 //INPUT VALs int ssp01val = 0; //selector switch position 1 val int ssp02val = 0; //selector switch position 2 val int ssp03val = 0; //selector switch position 3 val int ssp04val = 0; //selector switch position 4 val int ssp05val = 0; //selector switch position 5 val int ssp06val = 0; //selector switch position 6 val int ssp07val = 0; //selector switch position 7 val int ssp08val = 0; //selector switch position 8 val int ssp09val = 0; //selector switch position 9 val int ssp10val = 0; //selector switch position 10 val int ssp11val = 0; //selector switch position 11 val int ssp12val = 0; //selector switch position 12 val int LED33val = 0; //Busy LED 33 val //OUTPUTS const int op01 = 2; //output pin d2 const int op02 = 3; //output pin d3 const int op03 = 4; //output pin d4 const int op04 = 5; //output pin d5 const int op05 = 6; //output pin d6 const int op06 = 7; //output pin d7 const int op07 = 8; //output pin d8 const int op08 = 9; //output pin d9 const int op09 = 13; //output pin d13 Busy LED 13 //OUTPUT VALs int op01val; //output pin d2 val int op02val; //output pin d3 val int op03val; //output pin d4 val int op04val; //output pin d5 val int op05val; //output pin d6 val int op06val; //output pin d7 val int op07val; //output pin d8 val int op08val; //output pin d9 val int op09val; //output pin d13 val Busy LED 13 void setup() { Serial.begin(9600); pinMode(ssp01,INPUT_PULLUP); //21 Input pins pinMode(ssp02,INPUT_PULLUP); //22 pinMode(ssp03,INPUT_PULLUP); //23 pinMode(ssp04,INPUT_PULLUP); //24 pinMode(ssp05,INPUT_PULLUP); //25 pinMode(ssp06,INPUT_PULLUP); //26 pinMode(ssp07,INPUT_PULLUP); //27 pinMode(ssp08,INPUT_PULLUP); //28 pinMode(ssp09,INPUT_PULLUP); //29 pinMode(ssp10,INPUT_PULLUP); //30 pinMode(ssp11,INPUT_PULLUP); //31 pinMode(ssp12,INPUT_PULLUP); //32 pinMode(LED33,INPUT); //33 LED Busy pin input value pinMode(op01,OUTPUT); pinMode(op02,OUTPUT); pinMode(op03,OUTPUT); pinMode(op04,OUTPUT); pinMode(op05,OUTPUT); pinMode(op06,OUTPUT); pinMode(op07,OUTPUT); pinMode(op08,OUTPUT); pinMode(op09,OUTPUT); } void loop() { op01val = digitalRead(op01); op02val = digitalRead(op02); op03val = digitalRead(op03); op04val = digitalRead(op04); op05val = digitalRead(op05); op06val = digitalRead(op06); op07val = digitalRead(op07); op08val = digitalRead(op08); op09val = digitalRead(op09); Serial.print("op01 "); // Serial.print output stuff Serial.print(op01val); Serial.print(" "); Serial.print("op02 "); Serial.print(op02val); Serial.print(" "); Serial.print("op03 "); Serial.print(op03val); Serial.print(" "); Serial.print("op04 "); Serial.print(op04val); Serial.print(" "); Serial.print("op05 "); Serial.print(op05val); Serial.print(" "); Serial.print("op06 "); Serial.print(op06val); Serial.print(" "); Serial.print("op07 "); Serial.print(op07val); Serial.print(" "); Serial.print("op08 "); Serial.print(op08val); Serial.print(" "); Serial.print("op09LED "); Serial.println(op09val); ssp01val = digitalRead(ssp01); if(ssp01val == LOW) // 11111110 (Message1 00001.mp3) { digitalWrite(op01, LOW); // 0 digitalWrite(op02, HIGH); // 1 digitalWrite(op03, HIGH); // 1 digitalWrite(op04, HIGH); // 1 digitalWrite(op05, HIGH); // 1 digitalWrite(op06, HIGH); // 1 digitalWrite(op07, HIGH); // 1 digitalWrite(op08, HIGH); // 1 } ssp02val = digitalRead(ssp02); if(ssp02val == LOW) // 11111101 (Message2 00002.mp3) { digitalWrite(op01, HIGH); // 1 digitalWrite(op02, LOW); // 0 digitalWrite(op03, HIGH); // 1 digitalWrite(op04, HIGH); // 1 digitalWrite(op05, HIGH); // 1 digitalWrite(op06, HIGH); // 1 digitalWrite(op07, HIGH); // 1 digitalWrite(op08, HIGH); // 1 } ssp03val = digitalRead(ssp03); if(ssp03val == LOW) // 11111100 (Message1 00003.mp3) { digitalWrite(op01, LOW); // 0 digitalWrite(op02, LOW); // 0 digitalWrite(op03, HIGH); // 1 digitalWrite(op04, HIGH); // 1 digitalWrite(op05, HIGH); // 1 digitalWrite(op06, HIGH); // 1 digitalWrite(op07, HIGH); // 1 digitalWrite(op08, HIGH); // 1 } ssp04val = digitalRead(ssp04); if(ssp04val == LOW) // 11111011 (Message1 00004.mp3) { digitalWrite(op01, HIGH); // 1 digitalWrite(op02, HIGH); // 1 digitalWrite(op03, LOW); // 0 digitalWrite(op04, HIGH); // 1 digitalWrite(op05, HIGH); // 1 digitalWrite(op06, HIGH); // 1 digitalWrite(op07, HIGH); // 1 digitalWrite(op08, HIGH); // 1 } ssp05val = digitalRead(ssp05); if(ssp05val == LOW) // 11111010 (Message1 00005.mp3) { digitalWrite(op01, LOW); // 0 digitalWrite(op02, HIGH); // 1 digitalWrite(op03, LOW); // 0 digitalWrite(op04, HIGH); // 1 digitalWrite(op05, HIGH); // 1 digitalWrite(op06, HIGH); // 1 digitalWrite(op07, HIGH); // 1 digitalWrite(op08, HIGH); // 1 } ssp06val = digitalRead(ssp06); if(ssp06val == LOW) // 11111001 (Message1 00006.mp3) { digitalWrite(op01, HIGH); // 1 digitalWrite(op02, LOW); // 0 digitalWrite(op03, LOW); // 0 digitalWrite(op04, HIGH); // 1 digitalWrite(op05, HIGH); // 1 digitalWrite(op06, HIGH); // 1 digitalWrite(op07, HIGH); // 1 digitalWrite(op08, HIGH); // 1 } ssp07val = digitalRead(ssp07); if(ssp07val == LOW) // 11111000 (Message1 00007.mp3) { digitalWrite(op01, LOW); // 0 digitalWrite(op02, LOW); // 0 digitalWrite(op03, LOW); // 0 digitalWrite(op04, HIGH); // 1 digitalWrite(op05, HIGH); // 1 digitalWrite(op06, HIGH); // 1 digitalWrite(op07, HIGH); // 1 digitalWrite(op08, HIGH); // 1 } ssp08val = digitalRead(ssp08); if(ssp08val == LOW) // 11110111 (Message1 00008.mp3) { digitalWrite(op01, HIGH); // 1 digitalWrite(op02, HIGH); // 1 digitalWrite(op03, HIGH); // 1 digitalWrite(op04, LOW); // 0 digitalWrite(op05, HIGH); // 1 digitalWrite(op06, HIGH); // 1 digitalWrite(op07, HIGH); // 1 digitalWrite(op08, HIGH); // 1 } ssp09val = digitalRead(ssp09); if(ssp09val == LOW) // 11110110 (Message1 00009.mp3) { digitalWrite(op01, LOW); // 0 digitalWrite(op02, HIGH); // 1 digitalWrite(op03, HIGH); // 1 digitalWrite(op04, LOW); // 0 digitalWrite(op05, HIGH); // 1 digitalWrite(op06, HIGH); // 1 digitalWrite(op07, HIGH); // 1 digitalWrite(op08, HIGH); // 1 } ssp10val = digitalRead(ssp10); if(ssp10val == LOW) // 11110101 (Message1 00010.mp3) { digitalWrite(op01, HIGH); // 1 digitalWrite(op02, LOW); // 0 digitalWrite(op03, HIGH); // 1 digitalWrite(op04, LOW); // 0 digitalWrite(op05, HIGH); // 1 digitalWrite(op06, HIGH); // 1 digitalWrite(op07, HIGH); // 1 digitalWrite(op08, HIGH); // 1 } ssp11val = digitalRead(ssp11); if(ssp11val == LOW) // 11110100 (Message1 00011.mp3) { digitalWrite(op01, LOW); // 0 digitalWrite(op02, LOW); // 0 digitalWrite(op03, HIGH); // 1 digitalWrite(op04, LOW); // 0 digitalWrite(op05, HIGH); // 1 digitalWrite(op06, HIGH); // 1 digitalWrite(op07, HIGH); // 1 digitalWrite(op08, HIGH); // 1 } ssp12val = digitalRead(ssp12); if(ssp12val == LOW) // 11110011 (Message1 00012.mp3) { digitalWrite(op01, HIGH); // 1 digitalWrite(op02, HIGH); // 1 digitalWrite(op03, LOW); // 0 digitalWrite(op04, LOW); // 0 digitalWrite(op05, HIGH); // 1 digitalWrite(op06, HIGH); // 1 digitalWrite(op07, HIGH); // 1 digitalWrite(op08, HIGH); // 1 } LED33val = digitalRead(LED33); // Read the state of the LED Busy value if(LED33val == LOW) // Busy LED pin 33 INPUT (LOW = Playing) { digitalWrite(op09, HIGH); // Busy LED pin 13 OUTPUT (LED = On) } else if(LED33val == HIGH) // Busy LED pin 33 INPUT (HIGH = Stopped) { digitalWrite(op09, LOW); // Busy LED pin 13 OUTPUT (LED = Off) } }