{"id":4209,"date":"2024-12-10T09:23:23","date_gmt":"2024-12-10T17:23:23","guid":{"rendered":"https:\/\/www.donluc.com\/?p=4209"},"modified":"2024-12-10T09:23:23","modified_gmt":"2024-12-10T17:23:23","slug":"project-15-environment-soil-moisture-sensor-mk20","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=4209","title":{"rendered":"Project #15: Environment \u2013 Soil Moisture Sensor \u2013 Mk20"},"content":{"rendered":"<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4209-1\" width=\"720\" height=\"480\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #Arduino #ASM #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03a.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03a.jpg\" alt=\"Soil Moisture Sensor\" width=\"720\" height=\"725\" class=\"alignnone size-full wp-image-4211\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03a.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03a-298x300.jpg 298w, https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03a-150x150.jpg 150w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03b.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03b.jpg\" alt=\"Soil Moisture Sensor\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-4212\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03b.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03b-300x200.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03c.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03c.jpg\" alt=\"Soil Moisture Sensor\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-4213\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03c.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/12\/DL2411Mk03c-300x200.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>Soil Moisture Sensor<\/strong><\/p>\n<p>Soil moisture is the critical parameter in agriculture. If there is a shortage or overabundance of water, plants may die. At the same time, this data depends on many external factors, primarily weather conditions and climate changes. That is why it is so vital to understand the most effective methods for analyzing soil moisture content.<\/p>\n<p>This term refers to the entire quantity of water in the ground\u2019s pores or on its surface. The moisture content of soil depends on such factors as weather, type of land, and plants. The parameter is vital in monitoring soil moisture activities, predicting natural disasters, managing water supply, etc. This data may signal a future flood or water deficit ahead of other indicators.<\/p>\n<p><strong>DL2411Mk03<\/strong><\/p>\n<p>1 x SparkFun RedBoard Qwiic<br \/>\n1 x Gravity: Analog Soil Moisture Sensor<br \/>\n2 x LED<br \/>\n1 x ProtoScrewShield<br \/>\n1 x USB Battery Pack<br \/>\n1 x USB Micro-B Cable<\/p>\n<p><strong>SparkFun RedBoard Qwiic<\/strong><\/p>\n<p>ASM &#8211; A0<br \/>\nLEDP- 13<br \/>\nLEDG- 12<br \/>\nVIN &#8211; +5V<br \/>\nGND &#8211; GND<\/p>\n<p><strong>DL2411Mk03p<\/strong><\/p>\n<p><strong>DL2411Mk03p.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/****** Don Luc Electronics \u00a9 ******\r\nSoftware Version Information\r\nProject #15: Environment \u2013 Soil Moisture Sensor \u2013 Mk20\r\n15-20\r\nDL2411Mk03p.ino\r\nDL2411Mk03\r\n1 x SparkFun RedBoard Qwiic\r\n1 x Gravity: Analog Soil Moisture Sensor\r\n2 x LED\r\n1 x ProtoScrewShield\r\n1 x USB Battery Pack\r\n1 x USB Micro-B Cable\r\n*\/\r\n\r\n\/\/ Include the Library Code\r\n\r\n\/\/ Gravity: Analog Soil Moisture Sensor\r\nint iSoilMoisture = A0;\r\nint iSoilMoistureVal = 0;\r\nint zz = 0;\r\n\/\/ Change Your Threshold Here\r\nint Threshold = 300;\r\n\r\n\/\/ LED ProtoScrewShield Yellow\r\nint iLEDProto = 13;\r\n\r\n\/\/ LED Green\r\nint iLEDGreen = 12;\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;15-20&quot;;\r\n\r\nvoid loop() {\r\n\r\n  \/\/ Gravity: Analog Soil Moisture Sensor\r\n  isSoilMoisture();\r\n\r\n  \/\/ Delay 1 Second\r\n  delay( 1000 );\r\n\r\n}\r\n<\/pre>\n<p><strong>getSoilMoisture.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Gravity: Analog Soil Moisture Sensor\r\n\/\/ Soil Moisture\r\nvoid isSoilMoisture(){\r\n\r\n  \/\/ Connect Soil Moisture Sensor to Analog 0\r\n  zz = analogRead( iSoilMoisture );\r\n\r\n  \/\/ iSoilMoistureVal =&gt; 0~900 Soil Moisture\r\n  iSoilMoistureVal = map( zz, 0, 715, 0, 900);\r\n\r\n  \/\/ Serial\r\n  Serial.print(&quot;Moisture Sensor Value: &quot;);\r\n\r\n  \/\/ Threshold\r\n  if (iSoilMoistureVal &gt; Threshold) {\r\n\r\n    \/\/ 300~900 - Humid Soil\r\n    \/\/ LEDProto\r\n    digitalWrite(iLEDProto, LOW);\r\n    \/\/ Serial\r\n    Serial.print( &quot;Humid Soil &quot; );\r\n    Serial.println( iSoilMoistureVal );\r\n    \/\/ LEDGreen\r\n    digitalWrite(iLEDGreen, HIGH);\r\n    \r\n  }\r\n  else {\r\n    \r\n    \/\/ 0-300 Dry Soil\r\n    \/\/ LEDGreen\r\n    digitalWrite(iLEDGreen, LOW);\r\n    \/\/ Serial\r\n    Serial.print( &quot;Dry Soil &quot; );\r\n    Serial.println( iSoilMoistureVal );\r\n    \/\/ LEDProto\r\n    digitalWrite(iLEDProto, HIGH);\r\n    \r\n  }\r\n\r\n}\r\n<\/pre>\n<p><strong>setup.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Setup\r\nvoid setup()\r\n{\r\n \r\n  \/\/ Delay\r\n  delay(100);\r\n\r\n  \/\/ Serial\r\n  Serial.begin(57600);\r\n\r\n  \/\/ Initialize the LED iLEDProto\r\n  pinMode(iLEDProto, OUTPUT);\r\n\r\n  \/\/ Initialize the LED iLEDGreen\r\n  pinMode(iLEDGreen, OUTPUT);\r\n\r\n  \/\/ Delay 1 Second\r\n  delay( 1000 );\r\n\r\n}\r\n<\/pre>\n<p>&#8212;&#8212;<\/p>\n<p><strong>People can contact us:<\/strong> https:\/\/www.donluc.com\/?page_id=1927<\/p>\n<p><strong>Electronics, IoT, Teacher, Instructor, R&#038;D and Consulting<\/strong><\/p>\n<ul>\n<li>Programming Language<\/li>\n<li>Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc&#8230;)<\/li>\n<li>IoT<\/li>\n<li>Wireless (Radio Frequency, Bluetooth, WiFi, Etc&#8230;)<\/li>\n<li>Robotics<\/li>\n<li>Automation<\/li>\n<li>Camera and Video Capture Receiver Stationary, Wheel\/Tank and Underwater Vehicle<\/li>\n<li>Unmanned Vehicles Terrestrial and Marine<\/li>\n<li>Machine Learning<\/li>\n<li>Artificial Intelligence (AI)<\/li>\n<li>RTOS<\/li>\n<li>Sensors, eHealth Sensors, Biosensor, and Biometric<\/li>\n<li>Research &#038; Development (R &#038; D)<\/li>\n<li>Consulting<\/li>\n<\/ul>\n<p><strong>Follow Us<\/strong><\/p>\n<p><strong>Luc Paquin \u2013 Curriculum Vitae &#8211; 2024<\/strong><br \/>\nhttps:\/\/www.donluc.com\/luc\/<\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.com\/<br \/>\n<strong>Facebook:<\/strong> https:\/\/www.facebook.com\/neosteam.labs.9\/<br \/>\n<strong>YouTube:<\/strong> https:\/\/www.youtube.com\/@thesass2063<br \/>\n<strong>Twitter:<\/strong> https:\/\/twitter.com\/labs_steam<br \/>\n<strong>Pinterest:<\/strong> https:\/\/www.pinterest.com\/NeoSteamLabs\/<br \/>\n<strong>Instagram:<\/strong> https:\/\/www.instagram.com\/neosteamlabs\/<br \/>\n<strong>Patreon:<\/strong> https:\/\/patreon.com\/DonLucElectronics59<br \/>\n<strong>DFRobot:<\/strong> https:\/\/learn.dfrobot.com\/user-10186.html<br \/>\n<strong>Hackster.io:<\/strong> https:\/\/www.hackster.io\/neosteam-labs<br \/>\n<strong>Elecrow:<\/strong> https:\/\/www.elecrow.com\/share\/sharepj\/center\/no\/760816d385ebb1edc0732fd873bfbf13<br \/>\n<strong>TikTok:<\/strong> https:\/\/www.tiktok.com\/@luc.paquin8<br \/>\n<strong>Twitch:<\/strong> https:\/\/www.twitch.tv\/lucpaquin<br \/>\n<strong>LinkedIn:<\/strong> https:\/\/www.linkedin.com\/in\/jlucpaquin\/<\/p>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212; #DonLucElectronics #DonLuc #Arduino #ASM #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; Soil Moisture Sensor Soil moisture is the critical parameter in agriculture. If there is a shortage or overabundance of water, plants may die. At the same time, this data depends on many external factors, primarily weather conditions and &#8230; <a title=\"Project #15: Environment \u2013 Soil Moisture Sensor \u2013 Mk20\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=4209\" aria-label=\"Read more about Project #15: Environment \u2013 Soil Moisture Sensor \u2013 Mk20\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[106,50,49,317,38,59,115,5,138,287,58,10,43],"tags":[6,92,102,4,320,19,107,85,325,24,9,27,360,109,33,34,108],"class_list":["post-4209","post","type-post","status-publish","format-standard","hentry","category-environment","category-arduino","category-consultant","category-dfrobot","category-digitalelectronics","category-fritzing","category-e-mentor","category-microcontrollers","category-patreon","category-program","category-arduino-programming","category-projects","category-sparkfun","tag-arduino","tag-battery","tag-components","tag-consultant","tag-dfrobot","tag-electronics","tag-environment","tag-fritzing","tag-gravity-soil-moisture-sensor","tag-microcontroller","tag-programming","tag-projects-2","tag-soil-moisture-sensor","tag-sparkfun","tag-technology","tag-video-blog","tag-vlog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4209"}],"version-history":[{"count":2,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4209\/revisions"}],"predecessor-version":[{"id":4239,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4209\/revisions\/4239"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}