Basic Motion Detection
Lab 3: ตรวจจับการเคลื่อนไหว
วัตถุประสงค์
จะได้เรียนรู้อะไร
Concept: Motion Detection
โหลด Project Code จาก AIC Github Repo เพื่อเปิดบน VSCode IDE
3.1 เปิดโปรเจกต์ aic-psoc-edge-epc2-imu-motion
เพิ่ม Include
Important Macros and Variables
สร้างฟังก์ชัน Raw accelerometer Conversion ชื่อ lsb_to_mp2()
lsb_to_mp2()สร้างฟังก์ชัน Magnitude Calcuation ชื่อ calculate_magnitude()
calculate_magnitude()สร้างฟังก์ชัน Motion Detection ชื่อ detect_motion()
detect_motion()สร้างฟังก์ชัน Motion State Conversion ชื่อ get_motion_string()
get_motion_string()3.2 เขียน Main Task Loop
Create Sensor Hub DAQ Task Function
3.3 Build และ Flash
3.4 Output ที่คาดหวัง
State Diagram

✍️ Exercise
Last updated
Was this helpful?