LIS2DH 6D Orientation detection source1 [SENSOR] LIS2DH 6D Orientation detection source code LIS2DH 의 Accelerometer 의 6D 방향 관련 센서 레지스터 셋팅 입니다. 참고 자료는 아래 PDF를 참고 하였습니다. 6D 의 방향에 대한 부분 입니다. 위와 같이 움직일 때 값을 확인 하기 위함 입니다. /* accelerometer interrupt occur function */ void LIS2DH12_INT1_handler(void) { read_reg(0x31, value); /* INT1_SRC (31h): Read value from INT1_SRC */ value &= 0b00111111; /* Bitwise AND operation */ switch (value) /* Action dependent on orientation */ { case 0x60:printf("TO.. 2022. 9. 14. 728x90 이전 1 다음