Question about power up SIM900.

Hello guys.

Th normal code for power up and power down, sim900 for software, are the same. How can check if sim900 are power up befor the go to do? Because when upload sketch to arduino and restard the program, if sim900 are power up, them get power down.

void powerUp() { pinMode(9, OUTPUT); digitalWrite(9,LOW); delay(1000); digitalWrite(9,HIGH); delay(2000); digitalWrite(9,LOW); delay(3000); }

Thx very much.

Please post the code that you are referring to

void powerUp() //its samer to power down { pinMode(9, OUTPUT); digitalWrite(9,LOW); delay(1000); digitalWrite(9,HIGH); delay(2000); digitalWrite(9,LOW); delay(3000); }

when upload sketch to arduino and restard the program, if sim900 are power up, them get power down.

Do you mean that when you call the powerUp() function the SIM900 is always turned off whatever its initial state ? If so then it is no surprise if you are powering it from pin 9 of the Arduino. Is that what you are doing ?

Please post a complete sketch that illustrates the problem

This are the sketch i am uploading. when i upload by usb to arduino, it restart, and sim900 continued ON, then this sketch turn off the sim900.

void setup() {
powerUp();
}

void loop() {
}

void powerUp() //its samer to power down
{
pinMode(9, OUTPUT);
digitalWrite(9,LOW);
delay(1000);
digitalWrite(9,HIGH);
delay(2000);
digitalWrite(9,LOW);
delay(3000);
}

This are the fuction i want do:

void powerUp() 
{
If SIM900 == OFF{
pinMode(9, OUTPUT);
digitalWrite(9,LOW);
delay(1000);
digitalWrite(9,HIGH);
delay(2000);
digitalWrite(9,LOW);
delay(3000);
}else{
nothing
}
}

Thx very much for the help ^^

If SIM900 == OFF

How is the SIM900 powered ?

What do you mean by OFF ?

Sim900 is assembled on the arduino UNO. And both turn on when I connect the UNO to the power, or to the USB.

How is the SIM900 powered ? f SIM900 == OFF = Sim900 are power down, then run then power up, if are power up, dont nothing.

Sim900 is assembled on the arduino UNO.
And both turn on when I connect the UNO to the power, or to the USB.

How can the SIM900 to be turned on/off independently of the Uno ?

Uno turn on when plug on usb or power suply, then sim900 get current, but star when send 5 v for pin 9. This are the code i was post.