มันเริ่มต้นขึ้นตอนที่พี่ไปเจอเจ้าตัว [PIR](https://s.shopee.co.th/7VBG2YelxK) [sensor](https://s.shopee.co.th/7VBG2rX65j) ที่ทำงานนี่แหละ เดินๆ อยู่ดีๆ ไฟก็สว่างวาบขึ้นมาเลย พอไปสืบดูก็พบว่ามันคือเซ็นเซอร์ตรวจจับการเคลื่อนไหวแบบ PIR นี่เอง เลยลองเขียนโค้ดง่ายๆ ขึ้นมาทดลองเล่นดู
แล้วถ้าน้องลองใช้แล้วพบว่ามันตรวจจับได้ไม่แม่นยำหรือแปลกๆ ลองปรับเกลียวที่อยู่บนตัว PIR Sensor ดูนะ ตัวนึงปรับระยะตรวจจับ อีกตัวปรับเวลาที่สัญญาณจะค้างไว้หลังตรวจจับได้
ลองทำดูแล้วเป็นยังไง มาเม้นท์บอกกันได้ด้านล่างเลยจ้า
ข้อมูล Frontmatter ดั้งเดิม
title: "The PIR Sensor"
description: "The PIR is the shorten form of Passive Infared Sensor. It detects movement. You can make anything start to work when someone is moving."
author: "danushi13"
category: ""
tags:
- "home automation"
- "sensor"
- "do when moving"
- "pir"
views: 3755
likes: 2
price: 1499
difficulty: "Easy"
components:
- "1x LED (generic)"
- "1x Jumper wires (generic)"
- "1x Arduino UNO"
- "1x PIR Motion Sensor (generic)"
tools: []
apps:
- "1x Arduino IDE"
downloadableFiles: []
documentationLinks: []
passwordHash: "aed30f2314a9aaf16d413b2cad7899ce229df84387c7a04165302b395be2b52a"
encryptedPayload: "U2FsdGVkX1+YHaMeYSjwXnikgOoEm+IxkJ6xtOCsVeT3+D7crWJqBTBwmQVtzPW+4esg+9N+/SndrIpTTFonvt3V8qx+PlkMxT2nM0DkEec="
seoDescription: "Learn how to use a PIR Sensor to detect motion and trigger actions in your Arduino projects."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/the-pir-sensor-d3aaca_cover.jpg"
lang: "th"