void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println(“Moisture level:”);
Serial.println(sensorValue/4.095);
sensorValue = analogRead(analogPin);
Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. Using code tags and other important information is explained in the How to use this forum post. Please read it.
Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read.
Let’s take a look at the error:
jtemp0905:
ms1-2:24: error: expected '(' before 'else'
So the problem is at line 24 of your sketch which is printed below with a helpful little caret to point to the position on the line where the error is: