User Switch
Lab 2: User Switch — อ่านปุ่มกด & Debounce
วัตถุประสงค์
จะได้เรียนรู้อะไร?
Hardware Information
Component
Port/Pin
หมายเหตุ
Lab 2.1 : อ่านปุ่มกดแบบ Polling
เพิ่ม Button Macros:
แก้ไขฟังก์ชั่น Main :
Lab 2.2 : Debounce แบบง่าย (Edge Detection)
ข้อผิดพลาด
ผลกระทบ
วิธีป้องกัน
เพิ่ม Button Macros
สร้างฟังก์ชัน Debounce
แก้ไข Main Loop
Debounce Flowchart
ทำความเข้าใจการเรียกใช้ Static Variables
✍️ Exercise
Last updated
Was this helpful?