SPIKE-RT C API Reference [Japanese]
An RTOS-based software platform for LEGO® Education SPIKE™.
読み取り中…
検索中…
一致する文字列を見つけられません
imu.h
[詳解]
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * API for the hub built-in IMU.
5 *
6 * Copyright (c) 2022 Embedded and Real-Time Systems Laboratory,
7 * Graduate School of Information Science, Nagoya Univ., JAPAN
8 */
9
35#ifndef _HUB_IMU_H_
36#define _HUB_IMU_H_
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42#include <stdint.h>
43#include <stdbool.h>
44#include <pbio/error.h>
45
57pbio_error_t hub_imu_init(void);
58
70bool hub_imu_is_ready(void);
71
83bool hub_imu_is_stationary(void);
84
94void hub_imu_set_tilt(float angle);
95
105void hub_imu_get_acceleration(float accel[3]);
106
116void hub_imu_get_angular_velocity(float angv[3]);
117
127float hub_imu_get_temperature(void);
128
138float hub_imu_get_heading(void);
139
147void hub_imu_reset_heading(void);
148
149#ifdef __cplusplus
150}
151#endif
152
153#endif // _HUB_IMU_H_
154
pbio_error_t hub_imu_init(void)
IMUドライバを初期化する.
Definition imu.c:32
bool hub_imu_is_ready(void)
IMUモジュールが使用可能かチェックする.
Definition imu.c:70
bool hub_imu_is_stationary(void)
IMUモジュールが静止状態がチェックする.
Definition imu.c:74
void hub_imu_get_angular_velocity(float angv[3])
IMUから角速度を取得する.
Definition imu.c:91
void hub_imu_get_acceleration(float accel[3])
IMUから加速度を取得する.
Definition imu.c:87
void hub_imu_reset_heading(void)
IMUの方位角をリセットする.
Definition imu.c:103
float hub_imu_get_heading(void)
IMUの方位角を返す.
Definition imu.c:99
void hub_imu_set_tilt(float angle)
IMUモジュールの傾斜角度をセットする.
Definition imu.c:78
float hub_imu_get_temperature(void)
IMUから温度を取得する.
Definition imu.c:95