I am connecting my Soil Moisture Temperature Sensor SHT10 with GSM Module SIM900A and GPS GY-GPS6MV2. Individually, all components work properly and give proper values. But when I interface all three components with Arduino, only Temperature sensor seems to work and GPS does not give any values. Even If I connect only SHT10 and GPS with Arduino Uno (without GSM), only SHT10 gives values but GPS doesn't.

My code is:

#include <AltSoftSerial.h>
#include <TinyGPS++.h>
#include <SHT1x.h>

AltSoftSerial gpsSerial (11,12);

TinyGPSPlus gps;

#define dataPin 6
#define clockPin 7
SHT1x sht1x(dataPin, clockPin);
float TEMP, HUMID;

void setup()           

void loop()            
TEMP = sht1x.readTemperatureC();
HUMID = sht1x.readHumidity();

void gps_value()        

Serial.println("Latitude: ");
Serial.println("Longitude: ");
Serial.println("Altitude Feet: ");
Serial.println("Horizontal Dilution of Precision: ");  //lower the better

What is happening here ?

Datasheet of SHT10


  • DId you try to connect the GSM and GPS modules without connecting the temperature sensor?
    – Macit
    May 20, 2017 at 10:08
  • @Majid_L Yes, I have done that. And it works. May 20, 2017 at 11:06
  • 1
    You should share the temperature sensor circuit and the power supply you are using. From the info you have given till now I think it is a problem related to hardware not software. It could be over loading the power supply or maybe the arduino is getting reset.
    – Macit
    May 20, 2017 at 11:13
  • @Majid_L I am powering Arduino with my PC itself. Jun 1, 2017 at 12:33

2 Answers 2


As already mentioned this seems to be a current related problem. You are powering your Arduino over Usb. The sensors themselves do work fine. Yet connecting all of them seems to draw too much current so they won’t work properly. (See this post for more information on current.


You could have used SoftwareSerial instead of AltSoftSerial.Since you are using AltSoftSerial please go through its library file to check how you need to deal with it. For Software Serial you need to use predefined Rx , Tx pins of Arduino rather than defining any other pins of it for Rx,Tx for connecting those to Rx Tx of tempterature sensor. For GPS try to define any 2 pins of Arduino as Rx Tx so that you can connect them to Rx Tx of GPS.Hope this helps you.

  • 1
    NEVER use a software serial library on the HardwareSerial pins (RX pin 0 and TX pin 1). And SoftwareSerial is the worst alternative. See this answer for more info.
    – slash-dev
    Mar 17, 2018 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.