Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You should create a program in Matlab that allows long-term monitoring of the plant soil to ensure that the plant receives water as it needs

You should create a program in Matlab that allows long-term monitoring of the plant soil to ensure that the plant receives water as it needs it. That means measuring the soil moisture using a soil moisture sensor attached to your Arduino or Grove board. When the soil is dry, have a MOSFET or Relay board turn a water pump on to deliver water to the soil, turning off the pump when there is enough water in the soil. Then wait until the soil is dry again and start the process over again.

So that sums up what I have to do. I'm using a Grove Beginner Kit and MATLAB for this. In addition, I have to make a graph of the moisture over time.

My code so far is as follows:

image text in transcribedWhat I'm struggling with is the graph I have to make. I know this code is very basic and the graphing part is completely wrong, but I honestly have no clue where to start with the graphing part. If you need any more context ask and you shall recieve.

\% The actual program clear all; close all a= arduino('COM3', 'uno'); \%set the variable readVoltage (a,A) \%check to see if moisture sensor works writeDigitalPin (a,D2,1); pause(1);writeDigitalPin (a,D2,)%check to se v= readVoltage (a,A); for v=0:96 if v>=3.5 writeDigitalPin (a,D2,1); pause(10); writeDigitalPin(a, 'D2', elseif ((v>2.9) \&\& (v

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

What attracts you about this role?

Answered: 1 week ago

Question

How many states in India?

Answered: 1 week ago

Question

HOW IS MARKETING CHANGING WITH ARTIFITIAL INTELIGENCE

Answered: 1 week ago

Question

Different types of Grading?

Answered: 1 week ago