Go Down

Topic: error (Read 442 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.
I speak for myself, not Arduino.


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