[SOLVED... Almost] ideas/help for arduino gsm remote control of engine preheater

Hi

I have been looking arround for a cheap way to remote control my engine preheater (needed as we have -15 degree C winters here)

first i came accros TiDiGino-   TiDiGino is based on a ATMEGA2560 chip and you ca it's almost perfect but has a limit in that it has only one temperatur sensor and i would like at least 2, one for cabin temp and one for coolant temp.

Another thing is that it might be more cheap to use 1 gsm shield and a relay shield...

anyways here is what i want in functions:

  1. Messure if preheater is on, can be done with detecting logic high or low.
  2. Messure if heater fan is on, again simple high/low would make do
  3. Messure temp... i had in mind the dallas type so i could run longer wires without trouble. at least 2 as above, maybe add one more to read outside temp.
  4. a simple relay used to short 2 pins on the heater's control clock would turn it on
  5. When heater is turned on messure the flame sensor

so when i turn heater on with a sms it should report back by sms that its turned on, then when flame is detected report back that too and then for each 5 degree raise in temps (either cabin temp or coolant) report back all temps (also outside). when the heater turns on the cabin fan report back that too... it should still report back temps. for turning on the heater it would be nice with 2 options a sms that just turns it on and let it run or one that just let it run for like 30 mins. format of sms could simple be: "TURN ON" or "TURN ON 30" and of course a "TURN OFF"

when heater is not running of course nice extra's could be asking status like temp with a sms...

but who can guide me here.. i would like to aviod spoon feed but might be needed as this is my first time with arduino

might have found a snippet for reading temp:

/* TDGino example 
Sketch to send a SMS with temperature and to check the DTMF section

 created 2011
 by Boris Landoni

 This example code is in the public domain.

http://www.open-electronics.org

http://www.futurashop.it

 */
 
 
#include <GSM.h>
#include <OneWire.h>
#include <DallasTemperature.h>
//for enable disable debug rem or not the string       #define DEBUG_PRINT
// definition of instance of GSM class
GSM gsm;





// Set pin numbers:
const int powergsm =  77;
const int ctsgsm   =  39;
const int rtsgsm   =  29;
const int dcdgsm   =  27;
const int dtrgsm   =  28;
const int reset    =  35;
const int ring     =  34;
const int ld1      =  25;
const int ld2      =  26;
const int stato    =  76;
const int rele1    =  36;
const int rele2    =  37;
const int sda      =  20;
const int scl      =  21;
const int in1      =  84;
const int in2      =  83;
const int stddtmf  =  14;
const int q1dtmf   =  72;
const int q2dtmf   =  73;
const int q3dtmf   =  74;
const int q4dtmf   =  75;
const int puls     =  62;
const int sonda    =  63;

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS sonda
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);
// arrays to hold device address
DeviceAddress insideThermometer;


float tempC=0;


void setup() {
  // set the digital pin as output:
  pinMode(powergsm, OUTPUT);      
  pinMode(rtsgsm, OUTPUT); 
  pinMode(dtrgsm, OUTPUT); 
  pinMode(reset, OUTPUT); 
  pinMode(ld1, OUTPUT); 
  pinMode(ld2, OUTPUT); 
  pinMode(rele1, OUTPUT); 
  pinMode(rele2, OUTPUT); 
  pinMode(sda, OUTPUT); 
  pinMode(scl, OUTPUT); 
  
  // set the digital pin as input:
  pinMode(ctsgsm, INPUT);      
  pinMode(dcdgsm, INPUT); 
  pinMode(ring, INPUT); 
  pinMode(stato, INPUT); 
  pinMode(in1, INPUT); 
  pinMode(in2, INPUT); 
  pinMode(stddtmf, INPUT); 
  pinMode(q1dtmf, INPUT); 
  pinMode(q2dtmf, INPUT); 
  pinMode(q3dtmf, INPUT); 
  pinMode(q4dtmf, INPUT); 
  pinMode(puls, INPUT); 
  pinMode(sonda, INPUT); 
  
  // start serial port at 9600 bps:
  Serial.begin(9600);
  //Serial1.begin(115200);
  Serial.println("system startup"); 
  //gsm.InitSerLine();   //initialize serial 1 
  gsm.TurnOn(115200);              //module power on
  gsm.InitParam(PARAM_SET_1);//configure the module  
  gsm.Echo(1);               //enable AT echo 
  
        Serial.print("Locating DS18B20 devices...");
        sensors.begin();
        Serial.print("Found ");
        Serial.print(sensors.getDeviceCount(), DEC);
        Serial.println(" devices.");
      
        // report parasite power requirements
        Serial.print("Parasite power is: "); 
        if (sensors.isParasitePowerMode()) Serial.println("ON");
        else Serial.println("OFF");

        if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0"); 
        // set the resolution to 9 bit (Each Dallas/Maxim device is capable of several different resolutions)
        sensors.setResolution(insideThermometer, 9);
       
        Serial.print("Device 0 Resolution: ");
        Serial.print(sensors.getResolution(insideThermometer), DEC); 
        Serial.println();
}


void loop()
{
  int response=0;
  char phone_num[20]; // array for the phone number string 
  char string[160];
  int tono=0;
  // if we get a valid byte, read analog ins:

    if (digitalRead(puls)==0)
    {
      int tempCdec=tempC;
      int tempCuni=(tempC*100)-(tempCdec*100);
      sprintf(string,"Temperatura rilevata %d.%d gradi",tempCdec,tempCuni);
      Serial.println(string);
      response=gsm.SendSMS("+**********",string);  //+********** insert your telephone number
      Serial.print("response ");
      Serial.println(response);
    }

could this be put in a sub routine of some kind and be called from a main loop? would make me understand a bit better. I would then call this when temp have raised 5 degrees. of course the void setup() part should be moved to start of main loop (just a guess here)

code comes from here: http://www.open-electronics.org/tidigino-contest/

i have removed the DTMF part of the void loop() so i guess i could remove these 2 parts also from the void setup() and set pin numbers section:

const int stddtmf  =  14;
const int q1dtmf   =  72;
const int q2dtmf   =  73;
const int q3dtmf   =  74;
const int q4dtmf   =  75;
pinMode(stddtmf, INPUT); 
  pinMode(q1dtmf, INPUT); 
  pinMode(q2dtmf, INPUT); 
  pinMode(q3dtmf, INPUT); 
  pinMode(q4dtmf, INPUT);

in the void loop part i want insert a AND statement so that its checking the prev temp and comparing with current so that we can send a sms at X degree raise..

normal i would do that like this:

void loop()
{
  int response=0;
  char phone_num[20]; // array for the phone number string 
  char string[160];
  int tono=0;
  // if we get a valid byte, read analog ins:

    if (digitalRead(puls)==0) [color=red]and temp - prevtemp => 5[/color]
    {
      int tempCdec=tempC;
      int tempCuni=(tempC*100)-(tempCdec*100);
      sprintf(string,"Temperatura rilevata %d.%d gradi",tempCdec,tempCuni);
      Serial.println(string);
      response=gsm.SendSMS("+**********",string);  //+********** insert your telephone number
      Serial.print("response ");
      Serial.println(response);
    }

is: int tono=0; needed ?

well i loaded up the sketch in the editor and found errors..

sketch_feb01b.cpp:16:17: error: GSM.h: No such file or directory
sketch_feb01b.cpp:17:21: error: OneWire.h: No such file or directory
sketch_feb01b.cpp:18:31: error: DallasTemperature.h: No such file or directory

These 3 files ARE saved with the sketch.... can't figure why the error

sketch_feb01b:20: error: 'GSM' does not name a type
sketch_feb01b:49: error: 'OneWire' does not name a type
sketch_feb01b:51: error: 'DallasTemperature' does not name a type
sketch_feb01b:53: error: 'DeviceAddress' does not name a type
sketch_feb01b.cpp: In function 'void setup()':
sketch_feb01b:87: error: 'gsm' was not declared in this scope
sketch_feb01b:88: error: 'PARAM_SET_1' was not declared in this scope
sketch_feb01b:92: error: 'sensors' was not declared in this scope
sketch_feb01b:102: error: 'insideThermometer' was not declared in this scope
sketch_feb01b:104: error: 'insideThermometer' was not declared in this scope
sketch_feb01b.cpp: In function 'void loop()':
sketch_feb01b:126: error: 'gsm' was not declared in this scope

i guess the rest might be related to first 3 "missing"

I don't know much about the sms part, but I know you need to have those files in the library folder on the computer not the same place as the sketch

oh... will try that... new at this so just figured to add them and save them with sketch

woohoo... worked like a charm once i figured where the library folder was on a mac... its inside the package and not in a folder on its own

so my sketch is as this so far:

/* TDGino example 
Sketch to send a SMS with temperature and to check the DTMF section

 created 2011
 by Boris Landoni

 This example code is in the public domain.

http://www.open-electronics.org

http://www.futurashop.it

 */
 
 
#include <GSM.h>
#include <OneWire.h>
#include <DallasTemperature.h>
//for enable disable debug rem or not the string       #define DEBUG_PRINT
// definition of instance of GSM class
GSM gsm;





// Set pin numbers:
const int powergsm =  77;
const int ctsgsm   =  39;
const int rtsgsm   =  29;
const int dcdgsm   =  27;
const int dtrgsm   =  28;
const int reset    =  35;
const int ring     =  34;
const int ld1      =  25;
const int ld2      =  26;
const int stato    =  76;
const int rele1    =  36;
const int rele2    =  37;
const int sda      =  20;
const int scl      =  21;
const int in1      =  84;
const int in2      =  83;
const int puls     =  62;
const int sonda    =  63;

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS sonda
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);
// arrays to hold device address
DeviceAddress insideThermometer;


float tempC=0;


void setup() {
  // set the digital pin as output:
  pinMode(powergsm, OUTPUT);      
  pinMode(rtsgsm, OUTPUT); 
  pinMode(dtrgsm, OUTPUT); 
  pinMode(reset, OUTPUT); 
  pinMode(ld1, OUTPUT); 
  pinMode(ld2, OUTPUT); 
  pinMode(rele1, OUTPUT); 
  pinMode(rele2, OUTPUT); 
  pinMode(sda, OUTPUT); 
  pinMode(scl, OUTPUT); 
  
  // set the digital pin as input:
  pinMode(ctsgsm, INPUT);      
  pinMode(dcdgsm, INPUT); 
  pinMode(ring, INPUT); 
  pinMode(stato, INPUT); 
  pinMode(in1, INPUT); 
  pinMode(in2, INPUT); 
  pinMode(puls, INPUT); 
  pinMode(sonda, INPUT); 
  
  // start serial port at 9600 bps:
  Serial.begin(9600);
  //Serial1.begin(115200);
  Serial.println("system startup"); 
  //gsm.InitSerLine();   //initialize serial 1 
  gsm.TurnOn(115200);              //module power on
  gsm.InitParam(PARAM_SET_1);//configure the module  
  gsm.Echo(1);               //enable AT echo 
  
        Serial.print("Locating DS18B20 devices...");
        sensors.begin();
        Serial.print("Found ");
        Serial.print(sensors.getDeviceCount(), DEC);
        Serial.println(" devices.");
      
        // report parasite power requirements
        Serial.print("Parasite power is: "); 
        if (sensors.isParasitePowerMode()) Serial.println("ON");
        else Serial.println("OFF");

        if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0"); 
        // set the resolution to 9 bit (Each Dallas/Maxim device is capable of several different resolutions)
        sensors.setResolution(insideThermometer, 9);
       
        Serial.print("Device 0 Resolution: ");
        Serial.print(sensors.getResolution(insideThermometer), DEC); 
        Serial.println();
}


void loop()
{
  int response=0;
  char phone_num[20]; // array for the phone number string 
  char string[160];
  int tono=0;
  // if we get a valid byte, read analog ins:

    if (digitalRead(puls)==0)
    {
      int tempCdec=tempC;
      int tempCuni=(tempC*100)-(tempCdec*100);
      sprintf(string,"Temperatura rilevata %d.%d gradi",tempCdec,tempCuni);
      Serial.println(string);
      response=gsm.SendSMS("+**********",string);  //+********** insert your telephone number
      Serial.print("response ");
      Serial.println(response);
    }
    }

Now i want to change when the sms is send... its triggered here:

if (digitalRead(puls)==0)

so logic seen i would have to change this to:

if (digitalRead(in1)==0)

with this the sms should only be send as long as in1 is active

now i want to add that its only send if in1 is active and that the temp has raised 5 degrees C... any ideas on how to do that?

Add a variable called for say tempflag, and have that variable == 1 if the temp raised 5 degrees,
so you would need three variables to make it simple
Oldtemp. =temp since last flag
newtemp. =current temp
Tempflag. = trigger variable
then you do your

If(newtemp - oldtemp > 5){
tempflag = 1;
}

if(digitalRead(in1) == 0 && tempflag == 1){
tempflag = 0; // reset flag first thing
Oldtemp = newtemp //
///do rest of code

}

This will only work if it goes up 5 degrees, so without additional modification if the temp went from 60 to 50 to 55 it wont trigger unless it hits 65
If you want to fix that just have it compare the abs() of the oldtemp and newtemp and then it will tell you if it went a change of 5degrees either way

no problem.. the preheater stops heating at 78 degrees C i think and will keep it there... its only so we can turn it on and know when the car is ready

but thanks for the help so far

thinkering with how to add a 2nd sensor.. is it more easy to have each sensor on its own input? or does it not matter when its these one wire thingy's?

have added option to send an sms when flame on the heater comes on and off... any comments on the last part of void loop?

/* TDGino example 
Sketch to send a SMS with temperature and to check the DTMF section

 created 2011
 by Boris Landoni

 This example code is in the public domain.

http://www.open-electronics.org

http://www.futurashop.it

 */

 
#include <GSM.h>
#include <OneWire.h>
#include <DallasTemperature.h>
//for enable disable debug rem or not the string       #define DEBUG_PRINT
// definition of instance of GSM class
GSM gsm;


// Set pin numbers:
const int powergsm =  77;
const int ctsgsm   =  39;
const int rtsgsm   =  29;
const int dcdgsm   =  27;
const int dtrgsm   =  28;
const int reset    =  35;
const int ring     =  34;
const int ld1      =  25;
const int ld2      =  26;
const int stato    =  76;
const int rele1    =  36;
const int rele2    =  37;
const int sda      =  20;
const int scl      =  21;
const int in1      =  84;
const int in2      =  83;
const int in3      =  82;
const int puls     =  62;
const int sonda    =  63;


// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS sonda


// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);


// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);


// arrays to hold device address
DeviceAddress insideThermometer;


float tempC=0;


void setup() {
  
  
  // set the digital pin as output:
  pinMode(powergsm, OUTPUT);      
  pinMode(rtsgsm, OUTPUT); 
  pinMode(dtrgsm, OUTPUT); 
  pinMode(reset, OUTPUT); 
  pinMode(ld1, OUTPUT); 
  pinMode(ld2, OUTPUT); 
  pinMode(rele1, OUTPUT); 
  pinMode(rele2, OUTPUT); 
  pinMode(sda, OUTPUT); 
  pinMode(scl, OUTPUT); 
  
  // set the digital pin as input:
  pinMode(ctsgsm, INPUT);      
  pinMode(dcdgsm, INPUT); 
  pinMode(ring, INPUT); 
  pinMode(stato, INPUT); 
  pinMode(in1, INPUT);                                //heater on/off
  pinMode(in2, INPUT);                                //cabinfan on/off
  pinMode(in3, INPUT);                                //Flamne on/off
  pinMode(puls, INPUT); 
  pinMode(sonda, INPUT); 
  
  
  // start serial port at 9600 bps:
  Serial.begin(9600);
  //Serial1.begin(115200);
    
  Serial.println("system startup"); 
  
  
  //gsm.InitSerLine();   //initialize serial 1 
  
  
  gsm.TurnOn(115200);              //module power on
  gsm.InitParam(PARAM_SET_1);//configure the module  
  gsm.Echo(1);               //enable AT echo 
  
        Serial.print("Locating DS18B20 devices...");
        sensors.begin();
        Serial.print("Found ");
        Serial.print(sensors.getDeviceCount(), DEC);
        Serial.println(" devices.");
      
        // report parasite power requirements
        Serial.print("Parasite power is: "); 
        if (sensors.isParasitePowerMode()) Serial.println("ON");
        else Serial.println("OFF");

        if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0"); 
        // set the resolution to 9 bit (Each Dallas/Maxim device is capable of several different resolutions)
        sensors.setResolution(insideThermometer, 9);
       
        Serial.print("Device 0 Resolution: ");
        Serial.print(sensors.getResolution(insideThermometer), DEC); 
        Serial.println();
}


void loop()

{
  int response=0;
  char phone_num[20]; // array for the phone number string 
  char string[160];
  int tono=0;
  int Oldtemp;        //temp since last flag
  int Newtemp=tempC;        //current temp
  int Tempflag;        //trigger variable
  int Flameflag=2;
  int Flame;
    
  // if we get a valid byte, read analog ins:

    {
     if(digitalRead(in3) == 0 && Flame == 0)
    {
     Flameflag = 1;
    }
      
     if(digitalRead(in3) == 1 && Flame == 1)
    {
     Flameflag = 0;
    }  
      
     if(digitalRead(in3) == 0)
    {
     Flame = 1;
    }
      
    
     if(digitalRead(in3) == 1)
    {
     Flame = 0;
    }
            
    
     if(Newtemp - Oldtemp > 5);
    {
     Tempflag = 1;
    }
    
    if(digitalRead(in1) == 0 && Tempflag == 1)
  
    {
      Tempflag = 0;                                     // reset flag first thing
      Oldtemp = tempC;
      int tempCdec=tempC;
      int tempCuni=(tempC*100)-(tempCdec*100);
      sprintf(string,"Temperatura rilevata %d.%d gradi",tempCdec,tempCuni);
      Serial.println(string);
      response=gsm.SendSMS("+**********",string);  //+********** insert your telephone number
      Serial.print("response ");
      Serial.println(response);
    }
    
    if(digitalRead(in3) == 0 && Flame == 1 && Flameflag == 1)
      {
      sprintf(string,"Flame On");
      Serial.println(string);
      response=gsm.SendSMS("+**********",string);  //+********** insert your telephone number
      Serial.print("response ");
      Serial.println(response);
      Flameflag=2;
    }
    
    if(digitalRead(in3) == 1 && Flame == 0 && Flameflag == 0)
      {
      sprintf(string,"Flame OFF");
      Serial.println(string);
      response=gsm.SendSMS("+**********",string);  //+********** insert your telephone number
      Serial.print("response ");
      Serial.println(response);
    }
    
    }
    }

what i wanted with the last part was to send a sms when flames comes on and when off... ie only when in3 changes status and not at each loop

anyone have a few sec's to look through my sketch and see if it should do as i intend?

I have in place seding out a sms for every X degree temp rises as long as heater is turned on.

last i added routine that should send out an sms when a flame is detected and when it goes out, but only when the input changes status and not on each loop

now the sketch look like this, would be happy if anyone had some time to look it over and comment on it:

/* TDGino example 
Sketch to send a SMS with temperature and to check the DTMF section

 created 2011
 by Boris Landoni

 This example code is in the public domain.

http://www.open-electronics.org

http://www.futurashop.it

 */

 
#include <GSM.h>
#include <OneWire.h>
#include <DallasTemperature.h>
//for enable disable debug rem or not the string       #define DEBUG_PRINT
// definition of instance of GSM class
GSM gsm;


// Set pin numbers:
const int powergsm =  77;
const int ctsgsm   =  39;
const int rtsgsm   =  29;
const int dcdgsm   =  27;
const int dtrgsm   =  28;
const int reset    =  35;
const int ring     =  34;
const int ld1      =  25;
const int ld2      =  26;
const int stato    =  76;
const int rele1    =  36;
const int rele2    =  37;
const int sda      =  20;
const int scl      =  21;
const int in1      =  84;
const int in2      =  83;
const int in3      =  82;
const int puls     =  62;
const int sonda    =  63;


// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS sonda


// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);


// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);


// arrays to hold device address
DeviceAddress insideThermometer;


float tempC=0;

int Flame;
int FlameState;
int Oldtemp;        //temp since last flag
int Tempflag;        //trigger variable
char phone_num[20]; // array for the phone number string 
char string[160];

void setup() {
  
  
  // set the digital pin as output:
  pinMode(powergsm, OUTPUT);      
  pinMode(rtsgsm, OUTPUT); 
  pinMode(dtrgsm, OUTPUT); 
  pinMode(reset, OUTPUT); 
  pinMode(ld1, OUTPUT); 
  pinMode(ld2, OUTPUT); 
  pinMode(rele1, OUTPUT); 
  pinMode(rele2, OUTPUT); 
  pinMode(sda, OUTPUT); 
  pinMode(scl, OUTPUT); 
  
  // set the digital pin as input:
  pinMode(ctsgsm, INPUT);      
  pinMode(dcdgsm, INPUT); 
  pinMode(ring, INPUT); 
  pinMode(stato, INPUT); 
  pinMode(in1, INPUT);                                //heater on/off
  pinMode(in2, INPUT);                                //cabinfan on/off
  pinMode(in3, INPUT);                                //Flamne on/off
  pinMode(puls, INPUT); 
  pinMode(sonda, INPUT); 
  
  
  
  
  // start serial port at 9600 bps:
  Serial.begin(9600);
  //Serial1.begin(115200);
    
  Serial.println("system startup"); 
  
  
  //gsm.InitSerLine();   //initialize serial 1 
  
  
  gsm.TurnOn(115200);              //module power on
  gsm.InitParam(PARAM_SET_1);//configure the module  
  gsm.Echo(1);               //enable AT echo 
  
        Serial.print("Locating DS18B20 devices...");
        sensors.begin();
        Serial.print("Found ");
        Serial.print(sensors.getDeviceCount(), DEC);
        Serial.println(" devices.");
      
        // report parasite power requirements
        Serial.print("Parasite power is: "); 
        if (sensors.isParasitePowerMode()) Serial.println("ON");
        else Serial.println("OFF");

        if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0"); 
        // set the resolution to 9 bit (Each Dallas/Maxim device is capable of several different resolutions)
        sensors.setResolution(insideThermometer, 9);
       
        Serial.print("Device 0 Resolution: ");
        Serial.print(sensors.getResolution(insideThermometer), DEC); 
        Serial.println();
        FlameState = digitalRead(in3);   // read the initial state
        
}


void loop()

{
  int response=0;
  int Newtemp=tempC;        //current temp
  Flame = digitalRead(in3);        // read input value and store it
        
  // if we get a valid byte, read analog ins:

    {
    
     if(Newtemp - Oldtemp > 5);
    {
     Tempflag = 1;
    }
    
    if(digitalRead(in1) == 0 && Tempflag == 1)
  
    {
      Tempflag = 0;                                     // reset flag first thing
      Oldtemp = tempC;
      int tempCdec=tempC;
      int tempCuni=(tempC*100)-(tempCdec*100);
      sprintf(string,"Temperatura rilevata %d.%d gradi",tempCdec,tempCuni);
      Serial.println(string);
      response=gsm.SendSMS("+**********",string);  //+********** insert your telephone number
      Serial.print("response ");
      Serial.println(response);
    }
    
    if (Flame != FlameState )               // the state has changed!
    {   
    
    if (Flame == LOW)   
      {
      sprintf(string,"Flame On");
      Serial.println(string);
      response=gsm.SendSMS("+**********",string);  //+********** insert your telephone number
      Serial.print("response ");
      Serial.println(response);

    }
    
    if (Flame == HIGH)  
      {
      sprintf(string,"Flame OFF");
      Serial.println(string);
      response=gsm.SendSMS("+**********",string);  //+********** insert your telephone number
      Serial.print("response ");
      Serial.println(response);
    }
    FlameState = Flame;      // save the new state in our variable
    }
    }
    }

I have no clue how the sms works, but the onewire devices should be on the same data line

so far i have decided to only have one until the rest of the sketch are in place.

that is most important to me right now.. not steaming ahead thinking my stuff should work if there are big errors

am i posting in the wrong section? or just impatient?

Perhaps you are just a bit impatient :smiley:

Anyway, what gsm modem are you using? GSM interfacing is one of my passion and I'm also currently trying to port my code into the arduino platform from pic mcus and avr (using native winavr).

Can you post your codes again without any of the gsm related stuff and instead just put some psuedo codes instead where you need to send the data or receive data from the modem. I'd like to give it a try.

hehe.. sometimes i get impatient.. this is going to be used to control the preheater in my car and temps here (denmark) are dropping like a stone.

i found this unit: TiDiGino-   TiDiGino is based on a ATMEGA2560 chip and you ca which has almost everything expect one extra input and 1 pr 2 extra temp sensors

the modem part itself can be found here: http://store.open-electronics.org/Breakout/GSM%20Breakout

i'm very new (2 days or so) so dont know what code to remove, what i'm trying is to take excisting code and add or replace code and then i read the code to understand just what my code does...

it might not be the best way but i hope people can help me started before i frezze to much :smiley: but sure for next projects i will need a book or 2 and learn more. the beuty of arduino is that features can be added later on when you get the ideas.

if i get this going of course the final sketch will be here for all to use, i'm sure i'm not the only one that can use this