This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

L104 and L16

I am getting error like this...program is running fine,when all file made to one main file..bt problem while creating different file....can some one suggest,how to clear this.
linking...
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: LCD_INIT MODULE: lcd.obj (LCD)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: _LCD_STR MODULE: lcd.obj (LCD)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: _LCD_CMD MODULE: lcd.obj (LCD)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: _LCD_DATA MODULE: lcd.obj (LCD)
*** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: _DELAY MODULE: lcd.obj (LCD)
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_LCD_STR?LCD
*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?LCD_INIT?LCD
Program Size: data=15.0 xdata=0 code=652

Parents Reply Children
  • thanks fr ur reply..ya he is my friend, we are doing same project in our college....that's why...dan u plz suggest what is the exact thing we have to change....i have tried with extern in header file also,bt it's not working...

  • dan u plz suggest
    I will save characters too and type 'no' instead of 'yes'

  • You maybe noticed that when I wrote an answer in the other thread, I hadn't even access to the error messages - your friend didn't find them important to post.

    extern helps when someone plays with variables in header files.

    But it isn't the solution for functions.

    You must, yourself, manage to figure out why the linker thinks it sees the same lcd functions twice. Have you included the same source file twice in the project? Have you placed actual function implementations in a header file?

  • So why don't you work together - instead of just duplicating each other's work??

  • Maybe the Professor said Not to and they listened?

  • This is my complete code:-
    suggest me plz...i thought i am good enough in c...bt still i am lagging in that....i will be thankful to u sir

    MAIN.C:-
    #include <REGX51.H>
    #include"SERIAL.c"
    #include"LCD.c"

    sbit rf=P2^0;
    sbit motor=P0^0;

    unsigned char asc,ok[2],r[4],a,i,oxoa, a,m[20],j,temp[10],temp1[10];

    \*prototypes*/
    void cmdwrt_lcd(unsigned char cmd);
    void serial_transmit(unsigned char *srstr);
    void command(unsigned char d[]);
    void serial_tx(unsigned char srda);
    void delay1();

    void gsm_send() { command("AT"); delay1(); command("AT+CMGF=1"); delay(65000); delay(65000); serial_transmit("AT+CMGS="); serial_tx('"'); serial_transmit("9710362655"); serial_tx('"'); serial_tx(0x0d); serial_tx(0x0a); delay(65000); delay(65000); delay(65000); delay(65000); serial_transmit("Vehicle Thefted "); serial_tx(0x0a); serial_transmit("Send Stop message to stop the vehicle"); serial_tx(0x0a); delay(650); serial_tx(0x1A); delay(65000); delay(65000); delay(65000); delay(65000); }
    void gsm_send1() { command("AT"); delay1(); command("AT+CMGF=1"); delay(65000); delay(65000); serial_transmit("AT+CMGS="); serial_tx('"'); serial_transmit("9710362655"); serial_tx('"'); serial_tx(0x0d); serial_tx(0x0a); delay(65000); delay(65000); delay(65000); delay(65000); serial_transmit("Your Vehicle has been stopped"); serial_tx(0x0a); delay(650); serial_tx(0x1A); delay(65000); delay(65000); delay(65000); delay(65000); }

    void wait_0x0a() { do { a=serial_rx(); }while(a!=0x0a); }
    void rec_msg() { //recevingmessage unsigned char i=0; do

    { while(RI==0); temp[i]=SBUF; i++; RI=0; } while(temp[i-1]!=0x0A); }
    void check_ok()
    { unsigned char i; for(i=0;i<=3;i++) //receving OK// { while(RI==0); temp1[i]=SBUF; RI=0; }
    } void command(unsigned char d[]) { serial_transmit(&d[0]); cmdwrt_lcd(0x80); //display_lcd(&d[0]); serial_tx(0x0d); wait_0x0a(); check_ok(); temp1[2]='\0'; delay(65000); delay(65000); cmdwrt_lcd(0xc0); }
    void delay1() { delay(65000);delay(65000);delay(65000); }
    void gsm_read() { command("AT"); delay1(); command("AT+CMGF=1"); delay1(); command("AT+CGSMS=1"); delay1(); command("AT+CMGD=1"); delay1(); cmdwrt_lcd(0x01); cmdwrt_lcd(0x80); display_lcd("Waiting for Msg"); for(j=0;j<=15;j++) { while(RI==0); //recevingmessage m[j]=SBUF; RI=0; } delay1(); cmdwrt_lcd(0xC0); display_lcd(&m[0]); delay1(); cmdwrt_lcd(0x01); cmdwrt_lcd(0x80); serial_transmit("AT+CMGR=1"); display_lcd("AT+CMGR=1"); serial_tx(0x0d); wait_0x0a(); wait_0x0a(); wait_0x0a(); rec_msg(); delay1(); temp[4]='\0'; cmdwrt_lcd(0xc0); display_lcd(&temp[0]); delay1(); delay1(); if(temp[0]=='S'&& temp[1]=='t'&&temp[2]=='o'&&temp[3]=='p') { motor=0; cmdwrt_lcd(0x01); cmdwrt_lcd(0x80); display_lcd("Vehicle Stopped"); gsm_send1();

    }

    }
    void main() { serial_init(); lcd_init(); P0=0x00; display_lcd("VEHI.THEFT ALERT"); cmdwrt_lcd(0xC0); display_lcd("SYSTEM USING GSM"); motor=1; delay(65000); delay(65000); delay(65000); delay(65000); while(1) { if(rf==0) { cmdwrt_lcd(0x01); display_lcd(" VEHICLE THEFTED"); gsm_send(); gsm_read(); while(rf==0); } } }

    lcd.c:-

    include <REGX51.H>

    sbit rs = P3^5;
    sbit rw = P3^6;
    sbit en = P3^7;

    void delay(unsigned int dela) { unsigned int i; for(i=0;i<dela;i++); }

    void cmdwrt_lcd(unsigned char cmd) { P1 = cmd; rs = 0; rw = 0; en = 1; delay(15); en = 0; delay(150); }

    void datawrt_lcd(unsigned char datas) { P1 = datas; rs = 1; rw = 0; en = 1; delay(15); en = 0; delay(150); }

    void display_lcd(unsigned char *lcdstr) { while (*lcdstr !='\0') { datawrt_lcd(*lcdstr); lcdstr++; } }

    void lcd_init() { cmdwrt_lcd(0x38); cmdwrt_lcd(0x0C); cmdwrt_lcd(0x01); cmdwrt_lcd(0x80); }

    SERAIL.c:-

    #include <REGX51.H>

    #include"header.h"
    //void datawrt_lcd(unsigned char datas);

    void serial_init() { TMOD = 0x20; TH1 = 0xFD; SCON = 0x50; TR1 = 1; }

    void serial_tx(unsigned char srda) { SBUF = srda; while(TI == 0); TI = 0; }

    void serial_transmit(unsigned char *srstr) { while(*srstr != '\0') { serial_tx(*srstr); //datawrt_lcd(*srstr); srstr++; } }

    unsigned char serial_rx() { unsigned char rbuf; while(RI == 0); RI = 0; rbuf = SBUF; return rbuf; }

    HEADER.h:-

    #ifndef HEADER_H
    #define HEADER_H

    extern void serial_tx(unsigned char);
    extern void serial_transmit(unsigned char *);
    extern unsigned char serial_rx();
    extern void serial_init();
    extern void lcd_init();
    extern void display_lcd(unsigned char *);
    extern void datawrt_lcd(unsigned char);
    extern void cmdwrt_lcd(unsigned char);
    extern void delay(unsigned int);

    #endif

    getting error as
    linking...
    *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: SERIAL_RX MODULE: SERIAL.obj (SERIAL)
    *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: _SERIAL_TRANSMIT MODULE: SERIAL.obj (SERIAL)
    *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: _SERIAL_TX MODULE: SERIAL.obj (SERIAL)
    *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: SERIAL_INIT MODULE: SERIAL.obj (SERIAL)
    *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: LCD_INIT MODULE: LCD.obj (LCD)
    *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: _DISPLAY_LCD MODULE: LCD.obj (LCD)
    *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: _DATAWRT_LCD MODULE: LCD.obj (LCD)
    *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: _CMDWRT_LCD MODULE: LCD.obj (LCD)
    *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: _DELAY MODULE: LCD.obj (LCD)
    *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?SERIAL_INIT?SERIAL
    *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_SERIAL_TRANSMIT?SERIAL
    *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?SERIAL_RX?SERIAL
    *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?_DISPLAY_LCD?LCD
    *** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS SEGMENT: ?PR?LCD_INIT?LCD
    Program Size: data=60.0 xdata=0 code=1087

  • can any body suggest me plz..by seeing above code......i have pinched my head last n8....bt i did,t gt the answer.

  • Interesting - you have managed to get the compiler to accept

    \*prototypes*/
    


    as a valid C comment?

    Another interesting thing - you never noticed the rules about how to post source code on this site? Don't you think your posted code looks very, very strange, with line breaks at very unexpected places? Didn't you start to figure out what was wrong with the strange look when you saw it?

    A third interesting thing - how will we be able to know if you have included the same C file twice in your project?

  • that i did't mentioned in code..that i have mentioned for your reference sir....i am new to this website..when i used to copy the code means it seems good..bt while i post in tht...it appers like tht...i hope this is some wat readable...

    MAIN.C:-

    #include <REGX51.H>
    #include"SERIAL.c"
    #include"LCD.c"

    sbit rf=P2^0;
    sbit motor=P0^0;

    unsigned char asc,ok[2],r[4],a,i,oxoa, a,m[20],j,temp[10],temp1[10];
    void cmdwrt_lcd(unsigned char cmd);
    void serial_transmit(unsigned char *srstr);
    void command(unsigned char d[]);
    void serial_tx(unsigned char srda);
    void delay1();

    void gsm_send()

    {

    command("AT");

    delay1();

    command("AT+CMGF=1");

    delay(65000);

    delay(65000);

    serial_transmit("AT+CMGS=");

    serial_tx('"');

    serial_transmit("9710362655");

    serial_tx('"');

    serial_tx(0x0d);

    serial_tx(0x0a);

    delay(65000);

    delay(65000);

    delay(65000); delay(65000); delay(65000);

    serial_transmit("Vehicle Thefted ");

    serial_tx(0x0a);

    serial_transmit("Send Stop message to stop the vehicle");

    serial_tx(0x0a);

    delay(650);

    serial_tx(0x1A);

    delay(65000); delay(65000); delay(65000); delay(65000); delay(65000);

    }

    void gsm_send1()

    {

    command("AT");

    delay1();

    command("AT+CMGF=1");

    delay(65000); delay(65000);

    serial_transmit("AT+CMGS=");

    serial_tx('"');

    serial_transmit("9710362655");

    serial_tx('"');

    serial_tx(0x0d);

    serial_tx(0x0a);

    delay(65000); delay(65000); delay(65000); delay(65000); delay(65000);

    serial_transmit("Your Vehicle has been stopped");

    serial_tx(0x0a);

    delay(650);

    serial_tx(0x1A);

    delay(65000); delay(65000); delay(65000); delay(65000); delay(65000); delay(65000);

    }

    void wait_0x0a()

    {

    do

    { a=serial_rx();

    } while(a!=0x0a); }

    void rec_msg()

    {

    unsigned char i=0;

    do

    { while(RI==0);

    temp[i]=SBUF;

    i++;

    RI=0;

    } while(temp[i-1]!=0x0A);

    }

    void check_ok()

    { unsigned char i;

    for(i=0;i<=3;i++) //receving OK//

    { while(RI==0);

    temp1[i]=SBUF;

    RI=0;

    }
    }

    void command(unsigned char d[])

    { serial_transmit(&d[0]);

    cmdwrt_lcd(0x80);

    //display_lcd(&d[0]);

    serial_tx(0x0d);

    wait_0x0a();

    check_ok();

    temp1[2]='\0';

    delay(65000); delay(65000);

    cmdwrt_lcd(0xc0);

    }

    void delay1()

    { delay(65000);delay(65000);delay(65000);

    }

    void gsm_read()

    { command("AT");

    delay1();

    command("AT+CMGF=1");

    delay1();

    command("AT+CGSMS=1");

    delay1();

    command("AT+CMGD=1");

    delay1();

    cmdwrt_lcd(0x01);

    cmdwrt_lcd(0x80);

    display_lcd("Waiting for Msg");

    for(j=0;j<=15;j++)

    { while(RI==0);

    m[j]=SBUF;

    RI=0; }

    delay1();

    cmdwrt_lcd(0xC0);

    display_lcd(&m[0]);

    delay1();

    cmdwrt_lcd(0x01);

    cmdwrt_lcd(0x80);

    serial_transmit("AT+CMGR=1");

    display_lcd("AT+CMGR=1");

    serial_tx(0x0d);

    wait_0x0a(); wait_0x0a(); wait_0x0a();

    rec_msg();

    delay1();

    temp[4]='\0';

    cmdwrt_lcd(0xc0);

    display_lcd(&temp[0]);

    delay1(); delay1();

    if(temp[0]=='S'&& temp[1]=='t'&&temp[2]=='o'&&temp[3]=='p')

    { motor=0;

    cmdwrt_lcd(0x01);

    cmdwrt_lcd(0x80);

    display_lcd("Vehicle Stopped");

    gsm_send1();

    }

    CODE FOR SERIAL(SERIAL.c):-

    #include <REGX51.H>
    #include"header.h"

    void serial_init()

    {

    TMOD = 0x20;

    TH1 = 0xFD;

    SCON = 0x50;

    TR1 = 1;

    }

    void serial_tx(unsigned char srda)

    { SBUF = srda;

    while(TI == 0);

    TI = 0;

    }

    void serial_transmit(unsigned char *srstr)

    {

    while(*srstr != '\0')

    {

    serial_tx(*srstr);

    //datawrt_lcd(*srstr);

    srstr++;

    } }

    unsigned char serial_rx()

    {

    unsigned char rbuf;

    while(RI == 0);

    RI = 0;

    rbuf = SBUF;

    return rbuf;

    }

    CODE FOR LCD(LCD.c):-

    #include <REGX51.H>
    #include"header.h"

    sbit rs = P3^5;
    sbit rw = P3^6;
    sbit en = P3^7;

    void delay(unsigned int dela)

    {

    unsigned int i;

    for(i=0;i<dela;i++);

    }

    void cmdwrt_lcd(unsigned char cmd)

    {

    P1 = cmd;

    rs = 0;

    rw = 0;

    en = 1;

    delay(15);

    en = 0;

    delay(150);

    }

    void datawrt_lcd(unsigned char datas)

    {

    P1 = datas;

    rs = 1;

    rw = 0;

    en = 1;

    delay(15);

    en = 0;

    delay(150);

    }

    void display_lcd(unsigned char *lcdstr)

    {

    while (*lcdstr !='\0')

    {

    datawrt_lcd(*lcdstr);

    lcdstr++;

    } }

    void lcd_init()

    {

    cmdwrt_lcd(0x38);

    cmdwrt_lcd(0x0C);

    cmdwrt_lcd(0x01);

    cmdwrt_lcd(0x80);

    }

    CODE FOR HEADER FILE(header.h)

    #ifndef HEADER_H
    #define HEADER_H

    extern void serial_tx(unsigned char);

    extern void serial_transmit(unsigned char *);

    extern unsigned char serial_rx();

    extern void serial_init();

    extern void lcd_init();

    extern void display_lcd(unsigned char *);

    extern void datawrt_lcd(unsigned char);

    extern void cmdwrt_lcd(unsigned char);

    extern void delay(unsigned int);

    #endif

  • So, instead of just leaping in blindly, don't you think it would be a good idea spending some time to find out how to use it properly?!

    Look at this picture: www.danlhenry.com/.../keil_code.png

    Is that really so hard?

    "i hope this is some wat readable..."

    Don't just "hope" - use the Preview and verify for sure!!

  • MAIN.c:-

    #include <REGX51.H>
    #include"SERIAL.c"
    #include"LCD.c"
    
    sbit rf=P2^0;
    sbit motor=P0^0;
    
    unsigned char asc,ok[2],r[4],a,i,oxoa, a,m[20],j,temp[10],temp1[10];
    void cmdwrt_lcd(unsigned char cmd);
    void serial_transmit(unsigned char *srstr);
    void command(unsigned char d[]);
    void serial_tx(unsigned char srda);
    void delay1();
    
    void gsm_send()
            {
                    command("AT");
                    delay1();
                    command("AT+CMGF=1");
                    delay(65000);
                    delay(65000);
                    serial_transmit("AT+CMGS=");
                    serial_tx('"');
                    serial_transmit("9710362655");
                    serial_tx('"');
                    serial_tx(0x0d);
                    serial_tx(0x0a);
                    delay(65000);
                    delay(65000);
                    serial_transmit("Vehicle Thefted ");
                    serial_tx(0x0a);
                    serial_transmit("Send Stop message to stop the vehicle");
                    serial_tx(0x0a);
                    delay(650);
                    serial_tx(0x1A);
                    delay(65000);
                    delay(65000);
            }
    
    void gsm_send1()
            {
                    command("AT");
                    delay1();
                    command("AT+CMGF=1");
                    delay(65000);
                    delay(65000);
                    serial_transmit("AT+CMGS=");
                    serial_tx('"');
                    serial_transmit("9710362655");
                    serial_tx('"');
                    serial_tx(0x0d);
                    serial_tx(0x0a);
                    delay(65000);
                    delay(65000);
                    serial_transmit("Your Vehicle has been stopped");
                    serial_tx(0x0a);
                    delay(650);
                    serial_tx(0x1A);
                    delay(65000);
                    delay(65000);
            }
    
    
    void wait_0x0a()
            {
                    do
                            {
                            a=serial_rx();
                            }while(a!=0x0a);
    
            }
    
    void rec_msg()
            {
            unsigned char i=0;
                    do
                       {
                            while(RI==0);
                            temp[i]=SBUF;
                            i++;
                            RI=0;
                            } while(temp[i-1]!=0x0A);
               }
    
    void check_ok()
    {
     unsigned char i;
            for(i=0;i<=3;i++)
                    {
                            while(RI==0);
                            temp1[i]=SBUF;
                            RI=0;
                    }
    }
    
    void command(unsigned char d[])
            {
                    serial_transmit(&d[0]);
                    cmdwrt_lcd(0x80);
                    serial_tx(0x0d);
                    wait_0x0a();
                    check_ok();
                    temp1[2]='\0';
                    delay(65000);
                    delay(65000);
                    cmdwrt_lcd(0xc0);
            }
    
    void delay1()
            {
                            delay(65000);delay(65000);delay(65000);
            }
    
    
    void gsm_read()
            {
                    command("AT");
                    delay1();
                    command("AT+CMGF=1");
                    delay1();
                    command("AT+CGSMS=1");
                    delay1();
                    command("AT+CMGD=1");
                    delay1();
                    cmdwrt_lcd(0x01);
                    cmdwrt_lcd(0x80);
                    display_lcd("Waiting for Msg");
                    for(j=0;j<=15;j++)
                            {
                                    while(RI==0);
                                    m[j]=SBUF;
                                    RI=0;
                            }
                    delay1();
                    cmdwrt_lcd(0xC0);
                    display_lcd(&m[0]);
                    delay1();
                    cmdwrt_lcd(0x01);
                    cmdwrt_lcd(0x80);
                    serial_transmit("AT+CMGR=1");
                    display_lcd("AT+CMGR=1");
                    serial_tx(0x0d);
                    wait_0x0a();
                    rec_msg();
                    delay1();
                    temp[4]='\0';
                    cmdwrt_lcd(0xc0);
                    display_lcd(&temp[0]);
                    delay1();
                    delay1();
                    if(temp[0]=='S'&& temp[1]=='t'&&temp[2]=='o'&&temp[3]=='p')
                            {
                                    motor=0;
                                    cmdwrt_lcd(0x01);
                                    cmdwrt_lcd(0x80);
                                    display_lcd("Vehicle Stopped");
                                    gsm_send1();
                            }
            }
    
    void main()
            {
                    serial_init();
                    lcd_init();
                    P0=0x00;
                    display_lcd("VEHI.THEFT ALERT");
                    cmdwrt_lcd(0xC0);
                    display_lcd("SYSTEM USING GSM");
                    motor=1;
                    delay(65000);
                    while(1)
                    {
                                    if(rf==0)
                                    {
                                    cmdwrt_lcd(0x01);
                                    display_lcd(" VEHICLE THEFTED");
                                    gsm_send();
                                    gsm_read();
                                    while(rf==0);
                                    }
                    }
            }</prev>
    
    
    CODE FOR SERIAL:-(SERIAL.c)
    
    #include <REGX51.H>
    #include"header.h"
    
    void serial_init()
            {
            TMOD = 0x20;
            TH1 = 0xFD;
            SCON = 0x50;
            TR1 = 1;
            }
    
    void serial_tx(unsigned char srda)
            {
                    SBUF = srda;
                    while(TI == 0);
                    TI = 0;
            }
    
    void serial_transmit(unsigned char *srstr)
            {
            while(*srstr != '\0')
                    {
                    serial_tx(*srstr);
                    srstr++;
                    }
            }
    
    unsigned char serial_rx()
            {
            unsigned char rbuf;
            while(RI == 0);
            RI = 0;
            rbuf = SBUF;
            return rbuf;
            }
    
    
    
    
    

  • CODE FOR LCD.c:-(LCD.c)

    #include <REGX51.H>
    
    sbit rs = P3^5;
    sbit rw = P3^6;
    sbit en = P3^7;
    
    void delay(unsigned int dela)
       {
       unsigned int i;
       for(i=0;i<dela;i++);
       }
    
    void cmdwrt_lcd(unsigned char cmd)
            {
            P1 = cmd;
            rs = 0;
            rw = 0;
            en = 1;
            delay(15);
            en = 0;
            delay(150);
            }
    
    void datawrt_lcd(unsigned char datas)
            {
            P1 = datas;
            rs = 1;
            rw = 0;
            en = 1;
            delay(15);
            en = 0;
            delay(150);
            }
    
    void display_lcd(unsigned char *lcdstr)
            {
            while (*lcdstr !='\0')
                    {
                    datawrt_lcd(*lcdstr);
                    lcdstr++;
                    }
            }
    
    void lcd_init()
            {
            cmdwrt_lcd(0x38);
            cmdwrt_lcd(0x0C);
            cmdwrt_lcd(0x01);
            cmdwrt_lcd(0x80);
            }
    

    CODE FOR HEADER.h:-(header.h)

    #ifndef HEADER_H
    #define HEADER_H
    
    extern void serial_tx(unsigned char);
    extern void serial_transmit(unsigned char *);
    extern unsigned char serial_rx();
    extern void serial_init();
    extern void lcd_init();
    extern void display_lcd(unsigned char *);
    extern void datawrt_lcd(unsigned char);
    extern void cmdwrt_lcd(unsigned char);
    extern void delay(unsigned int);
    
    #endif
    

  • #include"SERIAL.c"
    #include"LCD.c"

    DO NOT #include .c files

    Erik

  • void gsm_send1()
            {
                    command("AT");
                    delay1();
                    command("AT+CMGF=1");
                    delay(65000);
                    delay(65000);
                    serial_transmit("AT+CMGS=");
                    serial_tx('"');
                    serial_transmit("9710362655");
                    serial_tx('"');
                    serial_tx(0x0d);
                    serial_tx(0x0a);
                    delay(65000);
                    delay(65000);
                    serial_transmit("Your Vehicle has been stopped");
                    serial_tx(0x0a);
                    delay(650);
                    serial_tx(0x1A);
                    delay(65000);
                    delay(65000);
            }
    

    This is a very bad approach!

    All AT commands give a response to indicate success or failure; you are ignoring these responses and just ploughing blindly on assuming success!!

    In addition, AT+CMGS gives a Prompt when it is ready for input...