Isd1820 code problem

I was making a smart blind stick most of my project is done but as you can see in the front i was trying to put an isd1820 voice recorder and playback module . I i
put isd 1820 on d13 pin , the isd 1820 was playing non stop . When i removed the isd 1820 the circuit was working fine , but once i put it in the circuit only the isd 1820 was playing nothing was working .

#include <SoftwareSerial.h>
#define trigPin1 5
#define echoPin1 4
#define trigPin2 7
#define echoPin2 6
#define trigPin3 9
#define echoPin3 8
int pe = 13;
int buzzerpinb = 3;
int LDRSensor = 10;
int buttonPin = 2;
SoftwareSerial bt(11,12);

long duration, distance, RightSensor,BackSensor,FrontSensor,LeftSensor;

void setup()
Serial.begin (9600);
pinMode(pe, INPUT_PULLUP);
pinMode(trigPin1, OUTPUT);
pinMode(echoPin1, INPUT);
pinMode(trigPin2, OUTPUT);
pinMode(echoPin2, INPUT);
pinMode(trigPin3, OUTPUT);
pinMode(echoPin3, INPUT);
 pinMode (LDRSensor, INPUT);
 pinMode(13 , OUTPUT);
 pinMode(2, INPUT_PULLUP);

void loop() {
SonarSensor(trigPin1, echoPin1);
RightSensor = distance;
SonarSensor(trigPin2, echoPin2);
LeftSensor = distance;
SonarSensor(trigPin3, echoPin3);
FrontSensor = distance;
Serial.print("Sensor 2");
Serial.print(" ");
Serial.print(" ");
Serial.print("Sensor 3");
Serial.print(" ");
Serial.print(" - ");
Serial.print("Sensor 1");
Serial.print(" - ");

int Sensordata = digitalRead (LDRSensor);
Serial.print("Light Sesnor Value");

if(Sensordata == 1){
  tone(buzzerpinb , 1000 , 500);
}else if (Sensordata==0){
int buttonval = digitalRead(buttonPin);
if (buttonval == LOW){
  Serial.println("Button pressed");
}else if (buttonval == HIGH){
  Serial.println("Button not pressed");
if(FrontSensor > 10 or LeftSensor > 10){
  digitalWrite(pe ,HIGH);
  digitalWrite(pe ,LOW);
if (RightSensor > 5){
  tone(buzzerpinb , 1000 , 500);
  tone(buzzerpinb , 1000 , 500);


void SonarSensor(int trigPin,int echoPin)
digitalWrite(trigPin, LOW);
digitalWrite(trigPin, HIGH);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;


This is my code , kindly help me quickly
ThanksPreformatted text

That is not code. It is text.
Use Autoformat in the IDE and code tags, </>, here.
while(1) means: do this piece of code forever.

is the code ok now

kindly tell the issue now

i have removed the while still not working

What do you mean by this? Exactly how is the isd1820 connected? i.e. every connection to the isd needs to be described.

Yes, a bit. Use the autoformat in the IDE before copying it. This makes the indentation work. Curly brackets stacked vertically is not good. Autoformat fixes that.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.