B4R Question GPRS shield power up /down with code

Tayfur

Well-Known Member
Licensed User
Longtime User
I used this shield. and WEMOS board
http://www.geeetech.com/wiki/index.php/Arduino_GPRS_Shield

How can i Power up/down with code.

İ try t. So. code dont work. :(

Code: Copy
Public Sub GSM_POWER(ONOFF As Boolean) As Boolean
    If ONOFF=True Then
        'power up
        led.DigitalWrite(True)
        Log("sim 900 sinya verildi ")
        led.digitalWrite(False)
         Delay(1000)
         led.digitalWrite(True)
         Delay(2000)
         led.digitalWrite(False)
         Delay(3000)
        Log("sim 900 sinya kesildi ")
        'GSM.Init(GSM_TX, GSM_RX)
        GSM.Init(wemos.D6, wemos.D5)
    Else
        'power down
         led.digitalWrite(False)
         Delay(1000)
         led.digitalWrite(True)
         Delay(2000)
         led.digitalWrite(False)
         Delay(3000)
    End If
    Return True
End Sub
 
Why are you starting with high output? It is not the same as in this code:
Code: Copy
void powerUp()
{
pinMode(9, OUTPUT);
digitalWrite(9,LOW);
delay(1000);
digitalWrite(9,HIGH);
delay(2000);
digitalWrite(9,LOW);
delay(3000);
}


I want open SIM900 use for :
(I dont want control with hand button, "Power key"- power up and down for SIM900)
  • D9 - Used for software control the power up or down of the SIM900


I converted your code.
So; it same my #1 post's code.

Code: Copy
Public Sub Power_Up
   'wemos.D7 >>>> connect to >>>> GPRS Shiled Pin9
   Led.intilize(wemos.D7,led.MODE_OUTPUT)
   led.digitalwrite(false)
   delay(1000)
   led.digitalwrite(true)
   Delay(2000)
   led.digitalwrite(false)
   Delay(3000)
end sub
 
Last edited:
Upvote 0
I SOLVED IT.

If use this way to power up the GPRS Shield, JP need to be soldered, then Digital Pin 9 of the Arduino will act as Software Triger port and Digital Pin 9 can not be use as other purpose. Then give Digital Pin 9 a Turn on Impulse can power up the GPRS Shield.
JP.png


Some bords has different location on borads.(My board location is different. :confused: ) . You must find this location. After, finally same way like JP.

this very important point for using Pin9 on GSM shiled.
 
Upvote 0
Back
Top