diff --git a/Code/Firmware/Firmware.ino b/Code/Firmware/Firmware.ino index 02b3e18..bdcd968 100644 --- a/Code/Firmware/Firmware.ino +++ b/Code/Firmware/Firmware.ino @@ -24,6 +24,7 @@ int phoneNumber[10] = {0,0,0,0,0,0,0,0,0,0}; int numberCount = 0; int speakerShutOffPin = 9; +int speakerShutOffToggle = 0; typedef enum { limbo = 0, @@ -101,6 +102,7 @@ void getAndDecodeState() { if (state==incomingCall) { digitalWrite(speakerShutOffPin, HIGH); } else if (state!=audioStreaming && state!=connected) { + speakerShutOffToggle = 0; digitalWrite(speakerShutOffPin, LOW); } free(stateHex); @@ -185,6 +187,7 @@ void loop() { } else { if (state==incomingCall || state==incomingCallHold) { serialSendVerify("C\r", "AOK"); + speakerShutOffToggle = 0; digitalWrite(speakerShutOffPin, LOW); } } @@ -208,9 +211,13 @@ void loop() { } else if (dialedNumber==3) { serialSendVerify("AP\r", "AOK"); } else if (dialedNumber==4) { - digitalWrite(speakerShutOffPin, HIGH); - } else if (dialedNumber==5) { - digitalWrite(speakerShutOffPin, LOW); + if (speakerShutOffToggle==0) { + speakerShutOffToggle = 1; + digitalWrite(speakerShutOffPin, HIGH); + } else { + speakerShutOffToggle = 0; + digitalWrite(speakerShutOffPin, LOW); + } } } else if (hook==0) { if (dialedNumber==3) { diff --git a/Code/Rotary_Player/Rotary Player.xcodeproj/project.xcworkspace/xcuserdata/grmrgecko.xcuserdatad/UserInterfaceState.xcuserstate b/Code/Rotary_Player/Rotary Player.xcodeproj/project.xcworkspace/xcuserdata/grmrgecko.xcuserdatad/UserInterfaceState.xcuserstate index 452ff0d..dfb2a61 100644 Binary files a/Code/Rotary_Player/Rotary Player.xcodeproj/project.xcworkspace/xcuserdata/grmrgecko.xcuserdatad/UserInterfaceState.xcuserstate and b/Code/Rotary_Player/Rotary Player.xcodeproj/project.xcworkspace/xcuserdata/grmrgecko.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Readme.md b/Readme.md index d8c47b0..96d4758 100644 --- a/Readme.md +++ b/Readme.md @@ -2,7 +2,7 @@ Rtoary Gecko is my work to convert a Rotary Phone into a Bluetooth Phone. You can dial numbers, and answer phone calls with your cell phone as the man in the middle that provides cell service. -The documents stored here are the major documents needed to make a Rotary Phone Bluetooth. To read my quest to build this Phone, visit my blog at http://mrgecko.org. To get videos/photos and documentation to the hardware which I collected, you can visit my bitcasa share at http://l.bitcasa.com/P3r9r6d1. +The documents stored here are the major documents needed to make a Rotary Phone Bluetooth. To read my quest to build this Phone, visit my blog at http://mrgecko.org. To get videos/photos and documentation to the hardware which I collected, you can visit my bitcasa share at http://l.bitcasa.com/xlehQejl. As I do with every code I write, I make it fairly easy to understand with my naming conventions, so there are not many comments to explain things, you should be able to just read it and know what it does.