Browse Source

Removed dialing of 5 to turn off speaker, added toggle for number 4 (speaker off/speaker on).

master
GRMrGecko 10 years ago
parent
commit
bb5dd175f4
  1. 13
      Code/Firmware/Firmware.ino
  2. BIN
      Code/Rotary_Player/Rotary Player.xcodeproj/project.xcworkspace/xcuserdata/grmrgecko.xcuserdatad/UserInterfaceState.xcuserstate
  3. 2
      Readme.md

13
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) {

BIN
Code/Rotary_Player/Rotary Player.xcodeproj/project.xcworkspace/xcuserdata/grmrgecko.xcuserdatad/UserInterfaceState.xcuserstate

2
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.
Loading…
Cancel
Save