title: GPRS doesn't send informations when connected to anemometer
body: <p>I've connected arduino to 4 different modules : </p>
  
  <ul>
  <li>RTC</li>
  <li>GPRS shield ( SARA G350 )</li>
  <li>Wind vane</li>
  <li>Anemometer</li>
  </ul>
  
  <p>Everytime I launch my system the GPRS doesn't send anything unless I disconnect my anemometer.
  I've tried the anemometer code on standalone and it works, I think the GPRS doesn't get enough power to send data when the anemometer is connected but how I'm not sure.</p>
  
  <pre><code>    #include &lt;SoftwareSerial.h&gt;
      #include &lt;Wire.h&gt;
      #include &lt;ds3231.h&gt;
  
      struct ts t;
      String Angle;
  
      int serial_in;
  
  
      double x = 0;
      double y = 0;
      double a = 0;
      double b = 0;
      const int sensorPin = A5; 
      const int numReadings = 10;
      int readings[numReadings];     
      int readIndex = 0;             
      int totalWind= 0;                
      int averageWind = 0;           
      int inputPin = A5;
      int sensorValue = 0;
      float sensorVoltage = 0; 
      float sensorVoltage2 = 0;
      float windSpeed = 0; 
  
      float voltageConversionConstant = .004882814; 
      int sensorDelay = 2000;
  
  
      float voltageMin = .4; 
      float windSpeedMin = 0; 
  
      float voltageMax = 2.0; 
      float windSpeedMax = 32; 
  
      SoftwareSerial mySerial(2, 3); //Tx &amp; Rx sont connectés aux broches Arduino #7 et #8
  
      void setup()
      {
        delay(15000);
       Wire.begin();
       DS3231_init(DS3231_INTCN);
       //Commence la communication Serie
       //Commence la communication Serie Arduino-Shield GPRS
        mySerial.begin(9600);
        delay(1000);
  
    mySerial.println("AT"); //Handshaking
    updateSerial();
    mySerial.println("AT+UPSDA=2,0"); //Reset connexion
      updateSerial();
      delay(2000);
       mySerial.println("AT+UPSD=2,1,\"sl2sfr\""); //Establissement de connexion avec l'APN
      updateSerial();
      delay(2000);
      mySerial.println("AT+UPSDA=2,3"); 
      updateSerial();
      delay(2000);
      mySerial.println("AT+UPSND=2,0");
      updateSerial();
      delay(2000);
  }
  
  void loop()
  {
    mySerial.println("AT+UPSDA=2,0"); //Reset connexion
      updateSerial();
      delay(2000);
       mySerial.println("AT+UPSD=2,1,\"sl2sfr\""); //Establissement de connexion avec l'APN
      updateSerial();
      delay(2000);
      mySerial.println("AT+UPSDA=2,3"); 
      updateSerial();
      delay(2000);
      mySerial.println("AT+UPSND=2,0");
      updateSerial();
      delay(2000);
  
     String Equipement = "STAINS";
     mySerial.println("AT+UHTTP=0");
      updateSerial();
      delay(2000);
      mySerial.println("AT+UHTTP=2,1,\"www.projetwmr.site\""); // Parametrage URL d'acces
      updateSerial();              
      delay(2000);
     String command = "AT+UHTTPC=2,5,\"/add.php\",\"post.ffs\",\"vite="; // Commande d'envoi des donnes via POST sur PHP
      anemometre(); // Recuperation des données ANALOGIQUES
      // convertion valeurs en String - Chaîne de caractères
      command += String(windSpeed);
      // or convertion précise
      // command += String(Windspeed, 2);
      command += "&amp;equipement=";
      command += String(Equipement);
       DS3231_get(&amp;t);
     String heure = String(t.hour);
     heure += ":";
     heure += String(t.min);
     heure += ":";
     heure += String(t.sec);
    String Date = String(t.year);
     Date += "-";
     Date += String(t.mon);
     Date += "-";
     Date += String(t.mday);
      command += "&amp;time=";
      command += String(heure);
      command += "&amp;date=";
      command += String(Date);
      command += "&amp;dire=";
      girouette();
      command += String(Angle);
      command += "\",0"; //Fin de la commande PHP POST
      mySerial.println(command);
      updateSerial();
      delay(45000);
  
  }
  
  void updateSerial()
  {
    delay(500);
    while (Serial.available()) 
    {
      mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
    }
    while(mySerial.available()) 
    {
      Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
    }
  }
  
  void girouette()
  {
   int sensorValue = analogRead(A1);
    if (sensorValue &gt;= 89  &amp;&amp; sensorValue&lt;=95  )
    {  Angle="0°"; }
  
      if (sensorValue &gt;=60  &amp;&amp; sensorValue&lt;=70  )
    {  Angle="22.5°"; }
  
      if (sensorValue &gt;=180   &amp;&amp; sensorValue&lt;=190  )
    {  Angle="45°"; }
  
  
      if (sensorValue &gt;= 124  &amp;&amp; sensorValue&lt;=130  )
    {  Angle="67.5°"; }
  
  
      if (sensorValue &gt;= 285  &amp;&amp; sensorValue&lt;=292  )
    {  Angle="90°"; }
  
  
      if (sensorValue &gt;=240   &amp;&amp; sensorValue&lt;=250  )
    {  Angle="115.5°"; }
  
  
      if (sensorValue &gt;= 630  &amp;&amp; sensorValue&lt;=640  )
    {  Angle="135°"; }
  
      if (sensorValue &gt;= 600  &amp;&amp; sensorValue&lt;=610  )
    {  Angle="157.5°"; }
  
      if (sensorValue &gt;=940  &amp;&amp; sensorValue&lt;=952  )
    {  Angle="180°"; }
  
  
      if (sensorValue &gt;=825   &amp;&amp; sensorValue&lt;= 840 )
    {  Angle="202.5°"; }
  
  
      if (sensorValue &gt;= 880  &amp;&amp; sensorValue&lt;= 898 )
    {  Angle="225°"; }
  
  
      if (sensorValue &gt;= 700  &amp;&amp; sensorValue&lt;= 712 )
    {  Angle="247.5°"; }
  
  
      if (sensorValue &gt;= 785  &amp;&amp; sensorValue&lt;= 795 )
    {  Angle="270°"; }
  
  
      if (sensorValue &gt;= 405  &amp;&amp; sensorValue&lt;= 415)
    {  Angle="292.5°"; }
  
  
      if (sensorValue &gt;= 460  &amp;&amp; sensorValue&lt;= 470 )
    {  Angle="315°"; }
  
  
      if (sensorValue &gt;= 78  &amp;&amp; sensorValue&lt;=87  )
    {  Angle="337.5°"; }
  
  
      if (sensorValue &gt;= 1000  &amp;&amp; sensorValue&lt;=50  )
    {  Angle="Error"; }
  
  delay(100);
  }
  
  void anemometre()
  {
  
    sensorValue = analogRead(A5); 
  
    totalWind = totalWind - readings[readIndex];
  
    readings[readIndex] = sensorValue;
  
    totalWind = totalWind + readings[readIndex];
  
    readIndex = readIndex + 1;
   sensorVoltage2 = sensorValue * voltageConversionConstant; 
    if (readIndex &gt;= numReadings) {
  
      readIndex = 0;
  
  
    averageWind = totalWind / numReadings;
  
    sensorVoltage = averageWind * voltageConversionConstant; 
  
  
    if (sensorVoltage &lt;= voltageMin) {
      windSpeed = 0; 
    } else {
      windSpeed = ((sensorVoltage - voltageMin) * windSpeedMax / (voltageMax - voltageMin))*1.55; 
    }
    }
  
  
  
    x = windSpeed;
    if (x &gt;= y) {
      y = x;
    } else {
      y = y;
    }
  
  
  
    a = sensorVoltage;
    if (a &gt;= b) {
      b = a;
    } else {
      b = b;
    }
  }
  </code></pre>