int Power=9;//addition code
unsigned char buffer[64]; // buffer array for data recieve over serial port
int count=0; // counter for buffer array
void setup()
{ GPRS.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the Serial port of Arduino baud rate.
pinMode(Power,OUTPUT);//addition code
digitalWrite(Power,HIGH);//addition code
Thanks for the proposed solution.
Unfortunately it does not work
Can you check if my GPRS shield version (1.0) supports software power up? If so, any other suggestion?
Thank you!
I’m just beginning experimentation with a GPRS shield.
Were you asking if the shield can be totally powered-off, and then awaken by (software) input?
Is this a common feature? Is it just a power saving feature that would benefit portable applications?
Thanks Jacket!
It is a pity that my old shield v1.0 cannot support SW on/off. It is not so convenient to have to push the button everytime that the arduino is powered on/off. Anyway, it is not the end of the world;-)
I received yesterday the new GPRS shield v2.0 and SW switch on/off works perfect on this one. I suggest that you add the sample code to the v2.0 wiki page (the wiki says v2.0 supports SW on/off but there is no indication about how to do it).
One last question. Is there an easy way to detect if the GPRS modem is on or off?
For your information, the way I do it now: In my setup method I try to send an AT command and if I receive no response I assume that is off. In this case I switch on thorugh SW using PIN9.
I found that the above posted code will both turn the shield or off, depending on the current condition of the shield.
The problem could come into play that you reset a already powered up and running arduino, and the powerup code, presumably in your setup routine, would execute again and turn off the shield.
I noticed with my V2.0 shield, that a much longer physical button press is required to turn the shield off than to turn it on.
I tinkered with the code, and I am now using this timing, which will turn the shield on, but will not turn it off if it is already on.
I suppose one could use AT commands to detect the current power-state of the SIM900, but this was easier for me.
I didnt bother messing with software solution…instead used a miniature reed relay actuated via arduino to perform powerup step. Theres always a caveman solution involving hardware sometimes…lol
is there a way to detect if the board is already powered on. I know I can send ‘AT’ and wait for ‘OK’ , just wondering if there is a more elegant solution like checking the state of a particular pin. Thanks!