Go Down

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


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);

void loop()
  moistureSensorValue = analogRead(moistureSensorPin);
  if(moistureSensorValue >= 700)
   if((moistureSensorValue < 700) && (moistureSensorValue >= 300)){


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.


Why do you think there is something wrong?

Two or three hours spent thinking and reading documentation solves most programming problems.


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

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131