Go Down

Topic: error (Read 188 times) previous topic - next topic

tobba__1990

hey want somebody who is good at every moment and throw an eye and tell you what I have gort wrong. Sincerely Tobias

int moistureSensorPin = 1;
int pumpPin = 5;
int pumpLEDPin = 3;

// variables
int moistureSensorValue;


void setup(){
pinMode(pumpLEDPin, OUTPUT);
pinMode(pumpPin,OUTPUT);
}

void loop()
{
  moistureSensorValue = analogRead(moistureSensorPin);
  if(moistureSensorValue >= 700)
    delay(5000);
    digitalWrite(pumpPin,LOW);}
{
   if((moistureSensorValue < 700) && (moistureSensorValue >= 300)){
      delay(5000);
      digitalWrite(pumpPin,HIGH);
      delay(6000);
    }

AWOL

Didn't the compiler tell you?

Use code tags.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Robin2

Why do you think there is something wrong?

...R

UKHeliBob

Try Auto Format in the IDE and it will give you a clue as to what is wrong.  Then examine every pair of curly braces and make sure that there is always a pair, not an odd one, and that the start and end braces are in the right place.
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Go Up