Go Down

Topic: What is wrong. Solved. (Read 1 time) previous topic - next topic

naturbot

Dec 01, 2012, 02:33 am Last Edit: Dec 09, 2012, 02:58 am by naturbot Reason: 1
What is wrong.

int sensorPinC = A2;
int sensorPinA = A0;
int sensorPinB = A1;
int sensorPinD = A3;// select the input pin for the potentiometer
int SPEACKER = 4;
int sensorValue = 0;  // variable to store the value coming from the sensor



void setup() {  
 pinMode(SPEACKER, OUTPUT);
 
}
 
 void loop()  
 
{
   
 noTone(4);
 
 sensorValue = analogRead(sensorPinA);
   
   {tone(4, 93, 58);
    while (sensorValue < 500);
    delay (100);}
   
    noTone(4);
   
    sensorValue = analogRead(sensorPinB);
   
  { tone(4, 523, 400);
     while (sensorValue  < 500);
    delay (100);  }
   
    noTone(4);
   
    sensorValue = analogRead(sensorPinC);
   
   {tone(4, 49, 80);
   
 
     while  (sensorValue < 500);
    delay (100);}
   
    noTone(4);
   
    sensorValue = analogRead(sensorPinD);
   
   {tone(4, 104, 139);
     if (sensorValue < 500);
    delay (100);}
   
   }
 

   
   
   
   

WizenedEE

Where does the setup() function end?

codlink

Why did you delete your other post?  You are making the same mistakes that you did before.  The other post had a ton of feedback on how to fix your code, yet you delete it and start a new thread with the same mistakes...
//LiNK

naturbot

I fixed that problem now what is wrong.

naturbot

Sorry I am new to this I never have been on a forum before now not even Facebook.

Go Up