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.

B4X:
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
 

Tayfur

Well-Known Member
Licensed User
Longtime User


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.

B4X:
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

Tayfur

Well-Known Member
Licensed User
Longtime User
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.


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

this very important point for using Pin9 on GSM shiled.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…