Where in your code are you getting the sensor value?
You will need code to handle the reponses you get from the modem. These will be a mixture of command replies, plus unsolicited result codes (URC) messages. URCs happen for example when a call or SMS come in.