Tayfur Well-Known Member Licensed User Longtime User Nov 22, 2016 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User Nov 22, 2016 #2 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); } Upvote 0
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); }
Tayfur Well-Known Member Licensed User Longtime User Nov 22, 2016 #3 Erel said: 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); } Click to expand... 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: Nov 22, 2016 Upvote 0
Erel said: 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); } Click to expand... 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
Erel B4X founder Staff member Licensed User Longtime User Nov 23, 2016 #4 Your code looks correct. It is the same is in the tutorial you posted. Based on that tutorial you also need to solder the jumper. Upvote 0
Your code looks correct. It is the same is in the tutorial you posted. Based on that tutorial you also need to solder the jumper.
Tayfur Well-Known Member Licensed User Longtime User Nov 23, 2016 #5 Code works for RX-TX ; D5 & D6 connected Shield. GND-GND connection Ok After wemos.D7 connected Sield pin9. After I run Powerup code on start. it didnt work!!! Upvote 0
Code works for RX-TX ; D5 & D6 connected Shield. GND-GND connection Ok After wemos.D7 connected Sield pin9. After I run Powerup code on start. it didnt work!!!
Tayfur Well-Known Member Licensed User Longtime User Nov 24, 2016 #6 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
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.