Arduino Uno R3 + SIM900

Hello,
I’m a programmer trying hardware

I’m trying to connect a SIM900 shield I bought online. So I’ve followed plenty of tutorials out there to connect the SIM shield with the Arduino UNO.

Well, it’s not going so well.

I’ve put an unlocked sim in it, and the netlight led blinks 3 in 3 seconds meaning its found the network.

I have also set the pins to D7 and D8, as plenty of people indicate. I am also using a power supply of 9v with 1A.

But when I try to run a simple basic example codes, they don’t execute as normally.

I run this example code:

#include <SoftwareSerial.h>

SoftwareSerial GPRS(7, 8);

unsigned char buffer[64];  // buffer array for data receive over serial port
int count=0;               // counter for buffer array 

void setup()
{
  GPRS.begin(19200);
  Serial.begin(19200);
}

void loop()
{
  if (GPRS.available())
  {
    while(GPRS.available())
    {
      buffer[count++]=GPRS.read();
      if(count == 64)break;
    }
    Serial.write(buffer,count);
    clearBufferArray();
    count = 0;
  }
  if (Serial.available())
    GPRS.write(Serial.read());
}

void clearBufferArray() 
{
  for (int i=0; i<count;i++)
  {
    buffer[i]=NULL;
  }
}

After that I type AT
and in the Serial Monitor with the 19200 baud selected and it prints this

(Two ??)

Seems like the commands aren’t being sent …

Here is how I have stuff built


FOUND THE SOLUTION

Opened
My GSM library (in the libraries folder), openeced GSM.cpp and changed the pin values (the tx and rx pins)