Forum: µC & Digital Electronics arduino uno + gsm shield with gsm.h and wire.h not compatible?

Author: Gilbert (Guest)
Posted on:

Rate this post
0 useful
not useful

I have written a program that uses the gsm shield (with library gsm.h) 
for sms and the i2c library wire.h for receiving sensor data.

Running the program without the wire.h library and WITHOUT using 
"wire.begin()" runs just fine, but by uncommenting the statenments 
"#include <wire.h>" and "wire.begin() inside the setup loop the 
controller does not get past the line of initialzing the gsm shield and 
hangs. Sometimes even after several retrys I get garbeled glyphs on the 
screen as if both libraries try to use the same memory space.

Has any one had that problem and therefore a solution to it?

Here is may code snipplet of the above area:

// initialize the library instance
GSM gsmAccess(debug);
GSM_SMS sms;
DateTime time;

void setup(){

pinMode(VoltPin, INPUT);
pinMode(LedPin_connected, OUTPUT);
pinMode(LedPin_not_connected, OUTPUT);
digitalWrite(LedPin_connected, LOW);
digitalWrite(LedPin_not_connected, HIGH);

//Zeit setzen
while(uhrzeitformat == 0)
  uhrzeitformat = analysiereFormat_uhrzeit(uhrzeit,  &stunden, 
&minuten,  &sekunden);//Ausgabe 1 = ok, 0 = falsch
Serial.print("Uhrzeit ");Serial.println(uhrzeit);
Serial.print("Stunde: ");Serial.println(stunden);
Serial.print("Minute: ");Serial.println(minuten);
Serial.print("Sekunde: ");Serial.println(sekunden);
/*setTime(stunden, minuten, sekunden,Tag,Monat,Jahr);
Serial.print("Stunde: ");Serial.println(hour(t));
Serial.print("Minute: ");Serial.println(minute(t));
Serial.print("Sekunde: ");Serial.println(second(t));*/

  Serial.println("Initialisiere GSM....");

  // connection state
  boolean notConnected = true;

  // Start GSM connection
      notConnected = false;
      Serial.println("Not connected");

  Serial.println("GSM initialized");

Any help is highly appreciated!
Thanks from Germany



Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.