1

What I am after is a reliable way of telling whether the GSM900 shield is powered up or not. "Obviously" the shield power is the constant green light. But i'm talking about the red light on the other side (next to the flashing green light).

I know i can PowerUp/Down by using the code

digitalWrite(9, HIGH);
Serial.println("write 9 high");
delay(1000);
digitalWrite(9, LOW);
Serial.println("write 9 low");
delay(5000);

And from the AT command manual, I can Power it down by using the command...

AT+CPOWD=1

So it seems that the only way I can ensure that the board is On, is to power it down and then toggle the power. Surely there's a better way than that?

Another idea is to issue a simple "AT" command, and if I get back "OK" then its on, and if I dont get anything back (timeout of maybe 2 seconds), then its off - thoughts?

  • the AT command seems decent, but 2 secs is a long time, shouldn't it be a few dozen ms max? you can also solder a bodge wire to the red led annode and feed that to an input to read(). – dandavis Oct 8 '17 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.