{"id":4658,"date":"2026-01-07T08:59:14","date_gmt":"2026-01-07T16:59:14","guid":{"rendered":"https:\/\/www.donluc.com\/?p=4658"},"modified":"2026-01-07T08:59:14","modified_gmt":"2026-01-07T16:59:14","slug":"project-28-sensors-pir-mk23","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=4658","title":{"rendered":"Project #28 \u2013 Sensors \u2013 PIR \u2013 Mk23"},"content":{"rendered":"<div style=\"width: 1200px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4658-1\" width=\"1200\" height=\"675\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #PIR  #WemosD1 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant<\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01a.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01a.jpg\" alt=\"PIR\" width=\"720\" height=\"599\" class=\"alignnone size-full wp-image-4660\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01a.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01a-300x250.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\/2026\/01\/DL2601Mk01b.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01b.jpg\" alt=\"PIR\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-4661\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01b.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01b-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\/2026\/01\/DL2601Mk01c.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01c.jpg\" alt=\"PIR\" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-4662\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01c.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/01\/DL2601Mk01c-300x200.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>Wemos D1<\/strong><\/p>\n<p>The Wemos D1 looks like the normal Arduino board with the same pin layout as the Uno, which means all of the shields which can be used with the Arduino Uno, will plug in seamlessly with the Wemos D1. While the connection is one thing, the shields must have matching libraries that work with the esp8266 platform so as to be able to establish easy communication between the Wemos and the shield.<\/p>\n<p><strong>Crowtail- PIR Motion Sensor 2.0<\/strong><\/p>\n<p>This is a simple to use PIR motion sensor with Crowtail compatible interface. Simply connect it to Crowtail base shield and program it, when anyone moves in its detecting range, the sensor outputs HIGH on its SIG pin. The detecting range can be adjusted by a potentiometer soldered on its circuit board, The max detecting range of it up to 6 meters.<\/p>\n<p><strong>DL2601Mk01<\/strong><\/p>\n<p>1 x Wemos D1<br \/>\n1 x Gravity: I2C 16&#215;2 Arduino LCD<br \/>\n1 x Crowtail- PIR Motion Sensor 2.0<br \/>\n1 x USB Battery Pack<br \/>\n1 x Micro USB Cable<\/p>\n<p><strong>DL2601Mk01p<\/strong><\/p>\n<p><strong>DL2601Mk01p.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 #28 \u2013 Sensors \u2013 PIR \u2013 Mk23\r\n28-23\r\nDL2601Mk01p.ino\r\nDL2601Mk01\r\n1 x Wemos D1\r\n1 x Gravity: I2C 16x2 Arduino LCD\r\n1 x Crowtail- PIR Motion Sensor 2.0\r\n1 x USB Battery Pack\r\n1 x Micro USB Cable\r\n*\/\r\n\r\n\/\/ Include the Library Code\r\n\/\/ Wire\r\n#include &lt;Wire.h&gt;\r\n\/\/ LCD1602 RGB Module\r\n#include &quot;DFRobot_RGBLCD1602.h&quot;\r\n\r\n\/\/ LCD1602 RGB Module\r\n\/*RGBAddr*\/\r\n\/*lcdCols*\/\r\n\/*lcdRows*\/\r\n\/\/ 16 characters and 2 lines of show\r\nDFRobot_RGBLCD1602 lcd(0x60 , 16, 2);\r\n\r\n\/\/ PIR motion sensor\r\n\/\/ Use pin 2 to receive the signal from the module  \r\n#define PIR_MOTION_SENSOR  D2\r\nint sensorValue;\r\nString sPIR = &quot;&quot;;\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;28-23&quot;;\r\n\r\nvoid loop() {\r\n  \r\n  \/\/ PIR\r\n  isPIR();\r\n\r\n  \/\/ isDisplayPIR\r\n  isDisplayPIR();\r\n\r\n  \/\/ Delay\r\n  delay( 1000 );\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\/\/ getDisplay\r\n\/\/ Gravity: I2C 16x2 Arduino LCD\r\n\/\/ Display UID\r\nvoid isDisplayUID(){\r\n\r\n  \/\/ Set up the LCD&#039;s number of rows and columns: \r\n  \/\/ Print a message to the LCD.\r\n  \/\/ Cursor\r\n  lcd.setCursor(0, 0);\r\n  lcd.print(&quot;Don Luc Electron&quot;);\r\n  \/\/ Cursor\r\n  lcd.setCursor(0, 1);\r\n  \/\/ Print a message to the LCD.\r\n  lcd.print( sver );\r\n\r\n}\r\n\/\/ Display PIR\r\nvoid isDisplayPIR(){\r\n\r\n  \/\/ Clear\r\n  lcd.clear();\r\n  \/\/ Set the cursor to column 0, line 0\r\n  lcd.setCursor(0, 0);\r\n  lcd.print( &quot;PIR&quot; );\r\n  \/\/ Set the cursor to column 0, line 1\r\n  lcd.setCursor(0, 1);\r\n  lcd.print( sPIR );\r\n  \r\n}\r\n<\/pre>\n<p><strong>getPIR.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ PIR motion sensor\r\n\/\/ is PIR\r\nvoid isPIR(){\r\n\r\n  \/\/ PIR\r\n  sensorValue = digitalRead(PIR_MOTION_SENSOR);\r\n\r\n  \/\/ If the sensor value is HIGH?\r\n  if(sensorValue == HIGH)\r\n\t{\r\n\t\t\r\n    \/\/ Yes, return true\r\n    sPIR = &quot;True&quot;;\r\n\r\n\t}\r\n\telse\r\n\t{\r\n\t\t\r\n    \/\/ No, return false\r\n    sPIR = &quot;False&quot;;\r\n\r\n\r\n\t}\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  \/\/ PIR motion sensor\r\n  pinMode(PIR_MOTION_SENSOR, INPUT);\r\n\r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n  \/\/ PIR motion sensor\r\n  lcd.init();\r\n\r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n  \/\/ Display UID\r\n  \/\/ Don Luc Electronic\r\n  \/\/ Version\r\n  isDisplayUID();\r\n\r\n  \/\/ Delay 5 Second\r\n  delay( 5000 );\r\n\r\n}\r\n<\/pre>\n<p><strong>People can contact us:<\/strong> https:\/\/www.donluc.com\/?page_id=1927<\/p>\n<p><strong>Consultant, R&#038;D, Electronics, IoT, Teacher and Instructor<\/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 , Underwater and UAV Vehicle<\/li>\n<li>Unmanned Vehicles Terrestrial,  Marine and UAV<\/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; 2026<\/strong><br \/>\nhttps:\/\/www.donluc.com\/luc\/LucPaquinCVEng2026Mk01.pdf<br \/>\nhttps:\/\/www.donluc.com\/luc\/<\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.com\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.jlpconsultants.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>DFRobot:<\/strong> https:\/\/learn.dfrobot.com\/user-10186.html<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>Hackster:<\/strong> https:\/\/www.hackster.io\/luc-paquin<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 #PIR #WemosD1 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; Wemos D1 The Wemos D1 looks like the normal Arduino board with the same pin layout as the Uno, which means all of the shields which can be used with the Arduino Uno, will plug in seamlessly with &#8230; <a title=\"Project #28 \u2013 Sensors \u2013 PIR \u2013 Mk23\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=4658\" aria-label=\"Read more about Project #28 \u2013 Sensors \u2013 PIR \u2013 Mk23\">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":[294,50,49,38,59,115,405,5,287,58,10],"tags":[],"class_list":["post-4658","post","type-post","status-publish","format-standard","hentry","category-sensors","category-arduino","category-consultant","category-digitalelectronics","category-fritzing","category-e-mentor","category-lafvin","category-microcontrollers","category-program","category-arduino-programming","category-projects"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4658","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=4658"}],"version-history":[{"count":1,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4658\/revisions"}],"predecessor-version":[{"id":4663,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4658\/revisions\/4663"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}