TAILIEUCHUNG - Bài giảng Lập trình Windows Phone (Module 4): Bài 7 - Trần Duy Thanh

Bài 7 của bài giảng Lập trình Windows Phone trang bị cho người học những kiến thức về Sensors như: Khái niệm Sensors, Orientation – Cảm biến xoay màn hình, Accelerometer – Cảm biến gia tốc kế, Compass – Cảm biến la bàn số, Gyroscope – Cảm biến con quay hồi chuyển. để nắm bắt các nội dung chi tiết. | Lập trình Windows Phone Module 4 – Bài 7: Sensors GV Biên soạn: Trần Duy Thanh Tác giả: Trần Duy Thanh 1 Nội dung Khái niệm Sensors Orientation – Cảm biến xoay màn hình Accelerometer – Cảm biến gia tốc kế Compass – Cảm biến la bàn số Gyroscope – Cảm biến con quay hồi chuyển 2 1. Khái niệm Sensors 3 2. Orientation – Cảm biến xoay màn hình 4 3. Accelerometer – Cảm biến gia tốc kế using ; using ; 5 3. Accelerometer – Cảm biến gia tốc kế Accelerometer accelerometer = new Accelerometer(); = (10); += accelerometer_CurrentValueChanged; (); 6 3. Accelerometer – Cảm biến gia tốc kế private void accelerometer_CurrentValueChanged( object sender, SensorReadingEventArgs e) { AccelerometerReading reading = ; Vector3 acceleration = ; //, , } 7 4. Compass – Cảm biến la bàn số 8 4. Compass – Cảm biến la bàn số Compass compass=new Compass(); = (33); += compass_CurrentValueChanged; // for calibration. += compass_Calibrate; (); 9 4. Compass – Cảm biến la bàn số private double headingAccuracy; private void compass_CurrentValueChanged( object sender, SensorReadingEventArgs e) { double trueHeading = ; float headingRadians = ((float)trueHeading); headingAccuracy = (); //xử lý headingAccuracy } 10 5. Gyroscope – Cảm biến con quay hồi chuyển 11 5. Gyroscope – Cảm biến con quay hồi chuyển private Gyroscope gyroscope; gyroscope = new Gyroscope(); = (20); += gyroscope_CurrentValueChanged; (); 12 5. Gyroscope – Cảm biến con quay hồi chuyển private void gyroscope_CurrentValueChanged( object sender, SensorReadingEventArgs e) { Vector3 currentRotationRate = ; } 13 Thảo luận Tác giả: Trần Duy Thanh 14

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.