Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an arduino program to control a plant watering system. The system has two sensor , a soil Moisture sensor on analog input AO and

Write an arduino program to control a plant watering system.
The system has two sensor, a soil Moisture sensor on analog input AO and a light sensor on analog input A1. It controls a pump on digital pin 8. At night the ground may be slightly dry but we do not want to water beacuse this could cause mold, so the pump should be off. We only want to water during daylight hours.
This table describes the behaviour of the system
Moisture light level pump
Wet Dark Off
Dry Dark Off
Dry Light On
Wet Light Off
.
The moisture sensor will read less than 2.5V when the soil is dry, and more than 2.5V when the soil is wet.
The light sensor will read less than 2.5V at night, and more than 2.5V during the day
Write the C code to implement this behaviour
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What are component percentages.' Why are they useful? LO1.

Answered: 1 week ago

Question

Please make it fast 2 2 1 .

Answered: 1 week ago

Question

What are the objectives of Human resource planning ?

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago

Question

5. Identify the logical fallacies, deceptive forms of reasoning

Answered: 1 week ago

Question

6. Choose an appropriate organizational strategy for your speech

Answered: 1 week ago