How to make soil moisture sensor using arduino with coding

By Aman kumar
Sun, 24-Nov-2019, 09:36

HInterface Soil Moisture Sensor and Arduino

Circuit Diagram – Analog Mode

Analog Code 

int sensor_pin = A0;

int output_value ;

void setup() {

   Serial.begin(9600);

   Serial.println("Reading From the Sensor ...");

   delay(2000);

   }

void loop() {

   output_value= analogRead(sensor_pin);

   output_value = map(output_value,550,0,0,100);

   Serial.print("Mositure : ");

   Serial.print(output_value);

   Serial.println("%");

   delay(1000);

   }

Related Updates

This site was designed with Websites.co.in - Website Builder

WhatsApp Google Map

Safety and Abuse Reporting

Thanks for being awesome!

We appreciate you contacting us. Our support will get back in touch with you soon!

Have a great day!

Are you sure you want to report abuse against this website?

Please note that your query will be processed only if we find it relevant. Rest all requests will be ignored. If you need help with the website, please login to your dashboard and connect to support

;