Sensor Interfacing
Session 02: IMU Sensors และ Motion Processing
วัตถุประสงค์การเรียนรู้
หลังจบ Session นี้ นิสิตจะสามารถ:
เข้าใจการทำงานของ IMU Sensor (BMI270) และการอ่านค่าผ่าน I2C
แปลงค่า Raw Data เป็นหน่วยทางฟิสิกส์ (m/s², rad/s)
เพิ่มฟังก์ชันประมวลผลข้อมูล (Magnitude, Motion Detection, Filtering)
ใช้ C Programming - Arrays, Structs, Pointers กับข้อมูล Sensor
โปรเจกต์หลัก (Base Project)
mtb-example-psoc-edge-sensor-hub-imu
├── proj_cm33_s/ # Secure Project
├── proj_cm33_ns/ # Non-Secure Project (เราทำงานที่นี่)
│ ├── main.c
│ ├── sensor_hub_daq_task.c # <-- ไฟล์หลักที่เราจะเรียนรู้และต่อยอด
│ └── sensor_hub_daq_task.h
└── proj_cm55/ # CM55 Projectสำคัญ: Labs ทั้งหมดจะเป็นการเพิ่มฟังก์ชันเข้าไปใน
sensor_hub_daq_task.cไม่ใช่การสร้างโปรเจกต์ใหม่!
โครงสร้างการเรียนรู้ (3 ชั่วโมง)
ลำดับ
หัวข้อ
1
ภาพรวม IMU Sensor และ I2C
2
Lab 1: ทำความเข้าใจโค้ด Sensor Hub
3
Lab 2: คำนวณ Acceleration Magnitude
4
Lab 3: ตรวจจับการเคลื่อนไหว
5
Lab 4: Moving Average Filter
6
Lab 5: ระบบ Motion Detection สมบูรณ์
7
สรุปและแบบทดสอบ
ภาพรวม IMU Sensor (Accelerometer + Gyroscope)



จบ Session 2 | ต่อไป: Session 3: LVGL Display
Last updated