AVR & REAL TIME SIMULATION FAILED TO START ERROR

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
#include<GSM.h>
int BUTTON1 = 4;   //water sensor
int BUTTON2 = 2;  //light sensor
int BUTTON3= 6;    //ultrasonic sensor
int GREEN = 10;   // vibration motor
int YELLOW = 12;
int BUZ = 7;
int GSM = 0;
void setup()
{
pinMode(BUTTON1,INPUT);
pinMode(BUTTON2,INPUT);
pinMode(BUTTON3,INPUT);
pinMode(GSM,OUTPUT);
pinMode(YELLOW,OUTPUT);
pinMode(YELLOW,OUTPUT);
pinMode(BUZ,OUTPUT);
Serial.begin(9600);
}
void loop()
{
if(GSM == HIGH)
    {
      sendsms();
      delay(2000);
    }
if(digitalRead(BUTTON1) == HIGH) //WATER SENSOR DETECTS WATERY OBSTACLE
{
digitalWrite(GREEN,1);           //VIBRATOR VIBRATES 
digitalWrite(BUZ,1);             //BUZZER MAKE SOUNDS
digitalWrite(GSM,1);             //GSM SEND OUT TEXT MESSAGE     
}
else
{
digitalWrite(GREEN,0);
digitalWrite(BUZ,0);
digitalWrite(GSM,0);
}
if(digitalRead(BUTTON2) == HIGH)
{
digitalWrite(YELLOW,1);   //LED lights up to make people aware about the presence of blind people in dark place
digitalWrite(BUZ,1);
digitalWrite(GSM,1);
}
else
{
digitalWrite(YELLOW,0);
digitalWrite(BUZ,0);
digitalWrite(GSM,0);
}
if(digitalRead(BUTTON3) == HIGH)
{
digitalWrite(GREEN,1);  
digitalWrite(YELLOW,1);
digitalWrite(GSM,1);
}
else
{
digitalWrite(GREEN,0);  
digitalWrite(YELLOW,0);
digitalWrite(GSM,0);
}
}
void sendsms()
{
  Serial.println("AT\r");
  delay(1000);
  Serial.println("AT+CMGF=1\r");
  delay(1000);
  Serial.println("AT+CMGS=\"XXXXXXXXXX\"\r");
  delay(1000);
  Serial.println("Facing Obstacle!!");
  delay(1000);
  Serial.println((char)26);
  delay(100);
}

anyone knows what is the problem in the code? the code can be compiled but after i insert the code into proteus, there are AVR and REAL TIME SIMULATION FAILED TO START.. thankyou :) 

mnmnisaghost

Last Edited: Thu. May 21, 2020 - 09:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could it be complaining about the lack of indentation? ;-)
.
Seriously, the code is almost impossible to read/follow without it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Proteus! Do we look like labcenter support?

What do THEY say about your error, you paid for the support, why are you not using it?

 

Jim

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Proteus support:

 

https://www.avrfreaks.net/commen...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i see, thankyou for the help blush

mnmnisaghost

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thankyouu

mnmnisaghost