Pages: [1]   Go Down
Author Topic: Adding 1602 display to Gsm SHield+Arduino Uno rev3  (Read 5075 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi to all,

currently i have arduino uno with gsm shield working perfectly. I integrated a button (using pin 6 for buttonpin) and when the button is pressed (HIGH) i am making a voice call.

The skech
Code:
#include <GSM.h>

#define PINNUMBER ""

// initialize the library instance
GSM gsmAccess; // include a 'true' parameter for debug enabled
GSMVoiceCall vcs;
const int buttonPin = 6;     // the number of the pushbutton pin
const int ledPin =  13;      // the number of the LED pin
int buttonState = 0;         // variable for reading the pushbutton status

void setup()
{
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);     
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);     
  // initialize serial communications
  //Serial.begin(9600);
 
 // Serial.println("SMS Messages Sender");

  // connection state
  boolean notConnected = true;

  // Start GSM shield
  // If your SIM has PIN, pass it as a parameter of begin() in quotes
  while(notConnected)
  {
    if(gsmAccess.begin(PINNUMBER)==GSM_READY)
      notConnected = false;
    else
    {
      Serial.println("Not connected");
      delay(1000);
    }
  }
 // Turn 13 pin led - READY ON
     digitalWrite(ledPin, HIGH);

 // Serial.println("GSM initialized");
}

void loop()
{
   buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {   
    // turn LED on:   

  if(vcs.voiceCall("MY_number_stays_here"))
        {
          // Turn Free LED OFF]   
          digitalWrite(ledPin, LOW);

          //Serial.println("Call Established. Enter line to end");
          // Wait for some input from the line
          while(vcs.getvoiceCallStatus()==TALKING);
          // And hang up
          vcs.hangCall();
        }
        // TURN FREE LED ON AGAIN after call finished
                  digitalWrite(ledPin, HIGH);

       // Serial.println("Call Finished");
  }
  }


My question is can i use LCD display and connect (wire) the pins as shown Here , but to connect directly on top of the GSM shield not at the arduino as shown in the picture.

As i see now i am using pins 3,6,5V and GND and in this picture - to connect LCD we have noting to do with pins 3 and 6 , so can i be sure that there will not be a problem??....short circuit , using same pin..or something like that?

Thanks
Logged

Madrid (Spain)
Offline Offline
Full Member
***
Karma: 0
Posts: 137
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You cannot use pin 3. Pin 3 is used by GSM shield to receive information from Arduino board.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks  for the answer . then if i use  another pin instead of pin 3 for the 1602 LCD screen, will everything work correctly?


LCD 1602 is using pins 2,3,4,5,11,12 , but if i change pin3 to with  one of the pins (7,8,9,10) will this work?
At the moment i think pins 7,8,9,10 are free i am not using them but not sure if GSM shield  is not...?
« Last Edit: January 04, 2014, 10:47:54 am by bishkot » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any other help?
Is it only this - not to use pin 3 by the 1602 LCD screen? Nothing else to take care of?
What about pins 2 and 7 ? as i see the also play role with the gsm shield?
Logged

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

pin 2 & 3 used by modem rx/tx
pin 7  used for power modem
you can use all other pins.
I used the Analog A0-A5 pins to connect 1602 on modem shield.
Works fine.
Logged

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you add micro and Loudspeaker?
How ???
Logged

Pages: [1]   Go Up
Jump to: