{"id":4139,"date":"2024-09-23T08:59:19","date_gmt":"2024-09-23T15:59:19","guid":{"rendered":"https:\/\/www.donluc.com\/?p=4139"},"modified":"2024-09-23T08:59:19","modified_gmt":"2024-09-23T15:59:19","slug":"project-29-dfrobot-shtc3-mk30","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=4139","title":{"rendered":"Project #29 &#8211; DFRobot &#8211; SHTC3 &#8211; Mk30"},"content":{"rendered":"<div style=\"width: 720px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4139-1\" width=\"720\" height=\"480\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #DFRobot #ASM #SHTC3 #FireBeetle2ESP32C6 #Display #EEPROM #ESP32 #IoT #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06a.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06a.png\" alt=\"SHTC3\" width=\"720\" height=\"559\" class=\"alignnone size-full wp-image-4141\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06a.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06a-300x233.png 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\/09\/DL2409Mk06b.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06b.png\" alt=\"SHTC3\" width=\"720\" height=\"540\" class=\"alignnone size-full wp-image-4142\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06b.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06b-300x225.png 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\/09\/DL2409Mk06c.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06c.png\" alt=\"SHTC3\" width=\"720\" height=\"540\" class=\"alignnone size-full wp-image-4143\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06c.png 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2024\/09\/DL2409Mk06c-300x225.png 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>Fermion: SHTC3 Temperature and Humidity Sensor<\/strong><\/p>\n<p>The SHTC3 digital humidity sensor from Sensirion builds on the success of the proven SHTC1 sensor and offers consistent high accuracy within the measuring range. The sensor covers a humidity measurement range of 0 to 100% RH and a temperature detection range of -40 Celsius to 125 Celsius with a typical accuracy of \u00b12% RH and \u00b10.2 Celsius. The board supply voltage of 3.3 Volt to 5 Volt and a current consumption below 0.15mA in low power mode make the SHTC3 perfectly suitable for mobile or wireless battery-driven applications.<\/p>\n<p><strong>DL2409Mk06<\/strong><\/p>\n<p>1 x FireBeetle 2 ESP32-C6<br \/>\n1 x Fermion: SHTC3 Temperature &#038; Humidity Sensor<br \/>\n1 x Fermion: 2.0&#8243; 320&#215;240 IPS TFT LCD<br \/>\n1 x GDL Line 10 CM<br \/>\n1 x Gravity: Analog Soil Moisture Sensor<br \/>\n1 x 3 AAA Battery Holder with On\/Off Switch and 2-Pin JST<br \/>\n3 x AAA Battery<br \/>\n1 x SparkFun Solderable Breadboard &#8211; Large<br \/>\n1 x USB 3.1 Cable A to C<\/p>\n<p><strong>FireBeetle 2 ESP32-C6<\/strong><\/p>\n<p>SCL &#8211; 20<br \/>\nSDA &#8211; 19<br \/>\nASM &#8211; A1<br \/>\nLED &#8211; 15<br \/>\nDC &#8211; D2<br \/>\nCS &#8211; D6<br \/>\nRST &#8211; D3<br \/>\nVIN &#8211; +3.3V<br \/>\nGND &#8211; GND<\/p>\n<p><strong>DL2409Mk06p<\/strong><\/p>\n<p><strong>DL2409Mk06p.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 #29 - DFRobot - SHTC3 - Mk30\r\n29-30\r\nDL2409Mk06p.ino\r\nDL2409Mk06\r\n1 x FireBeetle 2 ESP32-C6\r\n1 x Fermion: SHTC3 Temperature &amp; Humidity Sensor\r\n1 x Fermion: 2.0&quot; 320x240 IPS TFT LCD\r\n1 x GDL Line 10 CM\r\n1 x Gravity: Analog Soil Moisture Sensor\r\n1 x 3 AAA Battery Holder with On\/Off Switch and 2-Pin JST\r\n3 x AAA Battery\r\n1 x SparkFun Solderable Breadboard - Large\r\n1 x USB 3.1 Cable A to C\r\n*\/\r\n\r\n\/\/ Include the Library Code\r\n\/\/ EEPROM Library to Read and Write EEPROM\r\n\/\/ with Unique ID for Unit\r\n#include &quot;EEPROM.h&quot;\r\n\/\/ Arduino\r\n#include &lt;Arduino.h&gt;\r\n\/\/ Wire\r\n#include &lt;Wire.h&gt;\r\n\/\/ DFRobot Display GDL API\r\n#include &lt;DFRobot_GDL.h&gt;\r\n\/\/ Fermion: SHTC3 Temperature &amp; Humidity Sensor\r\n#include&quot;DFRobot_SHTC3.h&quot;\r\n\r\n\/\/ Fermion: SHTC3 Temperature &amp; Humidity Sensor\r\nDFRobot_SHTC3 SHTC3;\r\nuint32_t id = 0;\r\nfloat temperature;\r\nfloat humidity;\r\n\r\n\/\/ Defined ESP32\r\n#define TFT_DC  D2\r\n#define TFT_CS  D6\r\n#define TFT_RST D3\r\n\r\n\/*dc=*\/ \/*cs=*\/ \/*rst=*\/\r\n\/\/ DFRobot Display 240x320\r\nDFRobot_ST7789_240x320_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);\r\n\r\n\/\/ Gravity: Analog Soil Moisture Sensor\r\nint iSoilMoisture = A1;\r\nint iSoilMoistureVal = 0;\r\nint zz = 0;\r\n\/\/ Change Your Threshold Here\r\nint Threshold = 300;\r\nString SM = &quot;&quot;;\r\n\r\n\/\/ LED Green\r\nint iLEDGreen = 15;\r\n\r\n\/\/ EEPROM Unique ID Information\r\n#define EEPROM_SIZE 64\r\nString uid = &quot;&quot;;\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;29-30&quot;;\r\n\r\nvoid loop() {\r\n\r\n  \/\/ SHTC3 Temperature and Humidity Sensor\r\n  isSHTC3();\r\n  \r\n  \/\/ Gravity: Analog Soil Moisture Sensor\r\n  isSoilMoisture();\r\n\r\n  \/\/ DFRobot Display 240x320 - ASM - Temperature and Humidity\r\n  isDisplayTH();\r\n\r\n  \/\/ Delay 5 Second\r\n  delay( 5000 );\r\n\r\n}\r\n<\/pre>\n<p><strong>getDisplay.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ DFRobot Display 240x320\r\n\/\/ DFRobot Display 240x320 - UID\r\nvoid isDisplayUID() {\r\n\r\n    \/\/ DFRobot Display 240x320\r\n    \/\/ Text Display\r\n    \/\/ Text Wrap\r\n    screen.setTextWrap(false);\r\n    \/\/ Rotation\r\n    screen.setRotation(3);\r\n    \/\/ Fill Screen =&gt; black\r\n    screen.fillScreen(0x0000);\r\n    \/\/ Text Color =&gt; white\r\n    screen.setTextColor(0xffff);\r\n    \/\/ Font =&gt; Free Mono 9pt\r\n    screen.setFont(&amp;FreeMono9pt7b);\r\n    \/\/ TextSize =&gt; 1.5\r\n    screen.setTextSize(1.5);\r\n    \/\/ DFRobot Display\r\n    screen.setCursor(0, 30);\r\n    screen.println(&quot;DFRobot Display&quot;);\r\n    \/\/ Don Luc Electronics\r\n    screen.setCursor(0, 60);\r\n    screen.println(&quot;Don Luc Electronics&quot;);\r\n    \/\/ Version\r\n    screen.setCursor(0, 90);\r\n    screen.println(&quot;Version&quot;);\r\n    screen.setCursor(0, 120);\r\n    screen.println( sver );\r\n    \/\/ EEPROM\r\n    screen.setCursor(0, 150);\r\n    screen.println(&quot;EEPROM&quot;);\r\n    screen.setCursor(0, 180);\r\n    screen.println( uid );\r\n\r\n}\r\n\/\/ DFRobot Display 240x320 - ASM - Temperature and Humidity\r\nvoid isDisplayTH() {\r\n  \r\n    \/\/ DFRobot Display 240x320\r\n    \/\/ Text Display\r\n    \/\/ Text Wrap\r\n    screen.setTextWrap(false);\r\n    \/\/ Rotation\r\n    screen.setRotation(3);\r\n    \/\/ Fill Screen =&gt; black\r\n    screen.fillScreen(0x0000);\r\n    \/\/ Text Color =&gt; white\r\n    screen.setTextColor(0xffff);\r\n    \/\/ Font =&gt; Free Mono 9pt\r\n    screen.setFont(&amp;FreeMono9pt7b);\r\n    \/\/ TextSize =&gt; 1.5\r\n    screen.setTextSize(1.5);\r\n    \/\/ Soil Moisture Sensor\r\n    screen.setCursor(0, 30);\r\n    screen.println(&quot;Soil Moisture Sensor&quot;);\r\n    \/\/ Gravity: Analog Soil Moisture Sensor\r\n    screen.setCursor(0, 60);\r\n    screen.println( &quot;ASM: &quot; );\r\n    screen.setCursor(60, 60);\r\n    screen.println( iSoilMoistureVal );\r\n    screen.setCursor(0, 90);\r\n    screen.println( SM );\r\n    \/\/ SHTC3 Temperature\r\n    screen.setCursor(0, 120);\r\n    screen.println( &quot;Tem: &quot; );\r\n    screen.setCursor(60, 120);\r\n    screen.println( temperature );\r\n    screen.setCursor(120, 120);\r\n    screen.println( &quot;C&quot; );\r\n    \/\/ SHTC3 Humidity\r\n    screen.setCursor(0, 150);\r\n    screen.println( &quot;Hum: &quot; );\r\n    screen.setCursor(60, 150);\r\n    screen.println( humidity );\r\n    screen.setCursor(120, 150);\r\n    screen.println( &quot;%RH&quot; );\r\n\r\n}\r\n<\/pre>\n<p><strong>getEEPROM.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ EEPROM\r\n\/\/ isUID EEPROM Unique ID\r\nvoid isUID() {\r\n  \r\n  \/\/ Is Unit ID\r\n  uid = &quot;&quot;;\r\n  for (int x = 0; x &lt; 7; x++)\r\n  {\r\n    uid = uid + char(EEPROM.read(x));\r\n  }\r\n  \r\n}\r\n<\/pre>\n<p><strong>getSHTC3.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ SHTC3 Temperature and Humidity Sensor\r\n\/\/ SHTC3\r\nvoid isSHTC3(){\r\n\r\n  \/\/ SHTC3 Temperature and Humidity Sensor\r\n  \/**\r\n   *    Mode  For configuring sensor working mode    \r\n   *    SHTC3\uff1a\r\n           PRECISION_HIGH_CLKSTRETCH_ON Clock Stretching Enabled \r\n   *       PRECISION_HIGH_CLKSTRETCH_OFF Clock Stretching Disabled \r\n   *       PRECISION_LOW_CLKSTRETCH_ON Clock Stretching Enabled &amp; Low Power\r\n   *       PRECISION_LOW_CLKSTRETCH_OFF Clock Stretching Disabled &amp; Low Power\r\n   *\/\r\n  temperature = SHTC3.getTemperature(PRECISION_HIGH_CLKSTRETCH_ON);\r\n  \/**\r\n   *    Mode  For configuring sensor working mode \r\n   *    SHTC3\r\n   *       PRECISION_HIGH_CLKSTRETCH_ON Clock Stretching Enabled \r\n   *       PRECISION_HIGH_CLKSTRETCH_OFF Clock Stretching Disabled \r\n   *       PRECISION_LOW_CLKSTRETCH_ON Clock Stretching Enabled &amp; Low Power\r\n   *       PRECISION_LOW_CLKSTRETCH_OFF Clock Stretching Disabled &amp; Low Power\r\n   *\/\r\n  humidity = SHTC3.getHumidity(PRECISION_HIGH_CLKSTRETCH_OFF);\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, 4095, 0, 900);\r\n\r\n  \/\/ Threshold\r\n  if (iSoilMoistureVal &gt; Threshold)\r\n\r\n    \/\/ 300~950 - Humid Soil\r\n    SM = &quot;Humid Soil&quot;;\r\n    \r\n  else {\r\n    \r\n    \/\/ 0-300 Dry Soil\r\n    SM = &quot;Dry Soil&quot;;\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  \/\/ Give display time to power on\r\n  delay(100);\r\n\r\n  \/\/ EEPROM Size\r\n  EEPROM.begin(EEPROM_SIZE);\r\n  \r\n  \/\/ EEPROM Unique ID\r\n  isUID();\r\n  \r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n  \/\/ Wire\r\n  Wire.begin();\r\n\r\n  \/\/ Delay\r\n  delay( 100 );\r\n  \r\n  \/\/ DFRobot Display 240x320\r\n  screen.begin();\r\n\r\n  \/\/ Delay\r\n  delay(100);\r\n\r\n  \/\/ Fermion: SHTC3 Temperature &amp; Humidity Sensor\r\n  SHTC3.begin();\r\n  \/*SHTC3 is set to sleep mode by default. Please wake it up before use. \r\n  Use SHTC3.sleep() to let SHTC3 enter sleep mode; SHTC3 \r\n  stops working in sleep mode*\/\r\n  SHTC3.wakeup();\r\n  \r\n  \/\/ Delay\r\n  delay(100);\r\n\r\n  \/\/ Initialize the LED Green\r\n  pinMode(iLEDGreen, OUTPUT);\r\n\r\n  \/\/ iLEDGreen HIGH\r\n  digitalWrite(iLEDGreen, HIGH );\r\n\r\n  \/\/ DFRobot Display 240x320 - UID\r\n  \/\/ Don Luc Electronics\r\n  \/\/ Version\r\n  \/\/ EEPROM\r\n  isDisplayUID();\r\n\r\n  \/\/ Delay 5 Second\r\n  delay( 5000 );\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>DFRobot Luc.Paquin:<\/strong> https:\/\/edu.dfrobot.com\/dashboard\/makelogs<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> www.tiktok.com\/@luc.paquin8<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 #DFRobot #ASM #SHTC3 #FireBeetle2ESP32C6 #Display #EEPROM #ESP32 #IoT #Arduino #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; Fermion: SHTC3 Temperature and Humidity Sensor The SHTC3 digital humidity sensor from Sensirion builds on the success of the proven SHTC1 sensor and offers consistent high accuracy within the measuring range. The sensor &#8230; <a title=\"Project #29 &#8211; DFRobot &#8211; SHTC3 &#8211; Mk30\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=4139\" aria-label=\"Read more about Project #29 &#8211; DFRobot &#8211; SHTC3 &#8211; Mk30\">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":[49,317,38,43],"tags":[6,92,102,4,320,87,19,107,83,85,24,9,84,344,326,109,33,34,108],"class_list":["post-4139","post","type-post","status-publish","format-standard","hentry","category-consultant","category-dfrobot","category-digitalelectronics","category-sparkfun","tag-arduino","tag-battery","tag-components","tag-consultant","tag-dfrobot","tag-display","tag-electronics","tag-environment","tag-esp32","tag-fritzing","tag-microcontroller","tag-programming","tag-programming-esp32","tag-shtc3","tag-soil-moisture","tag-sparkfun","tag-technology","tag-video-blog","tag-vlog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4139","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=4139"}],"version-history":[{"count":1,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4139\/revisions"}],"predecessor-version":[{"id":4144,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4139\/revisions\/4144"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}