on | off slow as hell to respond

Digital pin 7 controls on / off for the GSM arduino modem.

I'm just doing some testing, so that I can turn the gsm modem on | off whenever I please (to save a to of battery hopefully it does not draw a hella lot of battery when it's in the off state...)

Problem: HIGH (on) is very quick and happens immediately. LOW (off) of the modem takes wayyy too long. It takes what seems like 1 minute after I call the function digitalWrite(xyz, LOW).

What's going on here? Is it because it has to connect to a network and do a power down sequence or something?

also if anyone knows the power draw for the gsm modem in an off state, kudos to you.

const int gsm_power = 7; // digital pin 7 controls the power for the GSM Arduino modem

void setup() {
pinMode(gsm_power, OUTPUT);
Serial.begin(9600);
}

void loop() {
digitalWrite(gsm_power, HIGH);
Serial.println("setting to high");
delay(1000);
digitalWrite(gsm_power,LOW);
Serial.println("setting to low");
delay(100000);

}

What do you reckon - this may have something to do with it --

delay(100000);

-- in the main loop()

lastchancename:
What do you reckon - this may have something to do with it --

delay(100000);

-- in the main loop()

Why would that affect anything?

That delay only controls the loop from starting over again.

This function is called first:
digitalWrite(gsm_power,LOW);
Serial.println("setting to low");

then there is a delay, until it loops over again and turns the device on again.

I'm not sure how the delay would precede the function before it?

The delay has absolutely nothing to do with it. I have been debugging this for a few days now. It has to do with the fact that high is a 1 low is a 0. So depending on what state it is, if it's already high and I set it to high nothing happens, same with low.