SPIKE-RT C API Reference [Japanese]
An RTOS-based software platform for LEGO® Education SPIKE™.
include
spike
hub
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
#include <stdint.h>
39
#include <pbio/error.h>
40
52
pbio_error_t
hub_imu_init
(
void
);
53
63
void
hub_imu_get_acceleration
(
float
accel[3]);
64
74
void
hub_imu_get_angular_velocity
(
float
angv[3]);
75
85
float
hub_imu_get_temperature
(
void
);
86
87
#endif
// _HUB_IMU_H_
88
hub_imu_init
pbio_error_t hub_imu_init(void)
IMUドライバを初期化する.
Definition:
imu.c:21
hub_imu_get_angular_velocity
void hub_imu_get_angular_velocity(float angv[3])
IMUから角速度を取得する.
Definition:
imu.c:29
hub_imu_get_acceleration
void hub_imu_get_acceleration(float accel[3])
IMUから加速度を取得する.
Definition:
imu.c:25
hub_imu_get_temperature
float hub_imu_get_temperature(void)
IMUから温度を取得する.
Definition:
imu.c:33
構築:
1.9.4