Ds18b20 TO SEND DATA TO PHONE USING GSM SHIELD?

i WANT my DS18b20 TO SEND data using my arduino and SIM900D to phone but i don't get any messages. :disappointed_relieved:

here is my code:

#include <SoftwareSerial.h>
#include <OneWire.h>
#include <DallasTemperature.h>
SoftwareSerial SIM900(0, 1);

#define ONE_WIRE_BUS 2
 

OneWire oneWire(ONE_WIRE_BUS);
 

DallasTemperature sensors(&oneWire);
int x;
String textForSMS;
 

void setup()
{
  SIM900.begin(19200);
  SIM900power();  
  delay(20000);  // give time to log on to network. 

  Serial.begin(9600);
  Serial.println("Dallas Temperature IC Control Library Demo");

  sensors.begin();
}
 
void SIM900power()
// software equivalent of pressing the GSM shield "power" button
{
  digitalWrite(9, HIGH);
  delay(1000);
  digitalWrite(9, LOW);
  delay(7000);
}
 
void sendSMS(String message)
{
  SIM900.print("AT+CMGF=1\r");                     // AT command to send SMS message
  delay(100);
  SIM900.println("AT + CMGS = \"+639125016648\"");  // recipient's mobile number, in international format
  delay(100);
  SIM900.println(message);                         // message to send
  delay(100);
  SIM900.println((char)26);                        // End AT command with a ^Z, ASCII code 26
  delay(100); 
  SIM900.println();
  delay(5000);                                     // give module time to send SMS
  SIM900power();                                   // turn off module
}
 
void loop()
{
  Serial.print(" Requesting temperatures...");
  sensors.requestTemperatures();
  Serial.print(sensors.getTempCByIndex(0));
  x = (int) sensors.getTempCByIndex(0);
  
 
  
  textForSMS = "Temperature is ";
  textForSMS.concat(x);
  textForSMS = textForSMS + " .";

  sendSMS(textForSMS);
  delay (60000);
}

i WANT my DS18b20 TO SEND data using my arduino and SIM900D to phone but i don't get any messages.

And pigs want wings. They are not going to get them anytime soon. And neither is your DS18B20 going to send data anywhere.

The Arduino has to get the data from the DS18B20 and send that data using the SIM900D.

here is my code:

Which does something. You couldn't be bothered explaining what it does.

You want it to do something unreasonable. Perhaps after reconsidering your expectations, you could explain your new expectations.

Uhm, im sorry if you misunderstood my words but what i'm trying to say is that my ds18B20 is connected to my arduino and it reads the temperature properly in the Serial Monitor.

Now, I want it to display the reading to my phone using GSM shield and my code is shown above turns out i haven't received any messages.

but what i'm trying to say is that my ds18B20 is connected to my arduino and it reads the temperature properly in the Serial Monitor.

The sensor reads the temperature in the serial monitor? How is that possible?

You need to understand the distinction between reading and writing, and understand which device is doing what.

sorry. English is not my 1st language. :sleeping: :sleeping:
I mean it displays the sensor reading in the serial monitor.