🎁📬❄️📦 Holiday Shipping Deadlines are approaching! International customers and domestic ground - get your orders in 12/9/2020 📦❄️📬🎁
0

Turn FONA on and off using Key pin
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Turn FONA on and off using Key pin

by dannya on Tue Feb 16, 2016 2:23 pm

I can't get my FONA to reliably turn on an off by toggling the Key pin. As per the documentation, I set the Key pin to HIGH when my board first turns on, then, when I'm ready to use the FONA module, I am setting the Key pin to LOW for 2,000ms, then bringing it HIGH again. When I do that, I see the blue light turn on, and another led flashes red once or twice, then the blue light goes off again.

Here is my code, can you let me know if I'm doing this correctly?

Code: Select all | TOGGLE FULL SIZE
int ps = digitalRead(FONA_PS);
    if(ps == LOW) {
      while(ps == LOW) {
        Serial.println("Trying to turn on FONA...");
        ps = digitalRead(FONA_PS);
        digitalWrite(FONA_KEY, LOW);
        delay(2000);
        digitalWrite(FONA_KEY, HIGH);               
      }
    }


Thank you!

dannya
 
Posts: 111
Joined: Thu Nov 14, 2013 7:35 pm

Re: Turn FONA on and off using Key pin

by adafruit_support_rick on Sat Feb 20, 2016 3:21 pm

Make sure KEY is HIGH before you set it low:
Code: Select all | TOGGLE FULL SIZE
int ps = digitalRead(FONA_PS);
    if(ps == LOW) {
      while(ps == LOW) {
        Serial.println("Trying to turn on FONA...");
        ps = digitalRead(FONA_PS);
digitalWrite(FONA_KEY, HIGH);
delay(10);  //not sure about this. May not need it, or it may need to be longer...
        digitalWrite(FONA_KEY, LOW);
        delay(2000);
        digitalWrite(FONA_KEY, HIGH);               
      }
    }

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Please be positive and constructive with your questions and comments.