C

Lexi L.

asked • 03/18/17

Can you tell me line by line what my code does?

I need this done! Can you help me please?
 
Void setup () {
PinMode (5, INPUT);
PinMode (10, OUTPUT);
PinMode (13, OUTPUT);
Serial.begin (9600);
}

VoidLoop (){
Bool moistureDetected = digitalRead (5);
Serial.Println ("moisture reading: ");
Serial.Println (moisureDetected);

If (moistureDetected == false);
digitalWrite (10, HIGH) {

DigitalWrite (13, HIGH);
Delay (1000);
digitalWrite (13, LOW);
Delay (1000);

} else {
DigitalWrite (1, LOW);
}
Delay (300);
}

Tim C.

tutor
Didn't you write this ?
Report

03/18/17

1 Expert Answer

By:

Spencer B. answered • 07/22/23

Tutor
New to Wyzant

Computer Science and Cybersecurity Researcher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.