HELP: TEL0051 and DS18B20

Hello
I want to use DS18B20 to get a temperature measurement, and i want to send temperature value as an SMS to my phone .
I uploaded this arduino sketch but i don't receive any thing ! the shield works under 1Wire protocol ?
I want to use DS18B20 to get a temperature measurement, and i want to send temperature value as an SMS to my phone .
I uploaded this arduino sketch but i don't receive any thing ! the shield works under 1Wire protocol ?
Code: Select all
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 22
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
byte gsmDriverPin[3] = {
3,4,5};
void setup(void)
{
Serial.begin(9600);
Serial.println("Dallas Temperature IC Control Library Demo");
sensors.begin();
for(int i = 0 ; i < 3; i++){
pinMode(gsmDriverPin[i],OUTPUT);
}
digitalWrite(5,HIGH);
delay(1500);
digitalWrite(5,LOW);
digitalWrite(3,LOW);
digitalWrite(4,HIGH);
delay(2000);
Serial.begin(9600);
delay(5000);
delay(5000);
delay(5000);
}
void smssend(void){
Serial.println("AT");
delay(2000);
Serial.println("AT");
delay(2000);
//Send message
Serial.println("AT+CMGF=1");
delay(1000);
Serial.println("AT+CMGS=\"0637077108\"");
delay(1000);
Serial.print("Alerte T a dépasser les limites");
delay(1000);
Serial.write(26);
while(1);
}
void loop(void)
{
Serial.print(" Requesting temperatures...");
sensors.requestTemperatures();
Serial.println("DONE");
Serial.print("Temperature for Device 1 is: ");
Serial.print(sensors.getTempCByIndex(0));
if ( sensors.getTempCByIndex(0)>30){
smssend();
}
}
2016-06-15 19:49:35 Hi idbella.lahsen,
Welcome, sorry about the late reply? Has it been solved so far?
If not, I suggest you could try this first, click here, it will send the GPS location out to another phoen via SMS. Then replace the GPS with your DS18B20 sensor data will work.
Hope it helps.
Leff
Welcome, sorry about the late reply? Has it been solved so far?
If not, I suggest you could try this first, click here, it will send the GPS location out to another phoen via SMS. Then replace the GPS with your DS18B20 sensor data will work.
Hope it helps.
