HRI board firmware  v2.1
Microcontroller firmware of the board used during the HRI labs.
mpu_6050.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 EPFL-LSRO (Laboratoire de Systemes Robotiques).
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __MPU_6050_H
18 #define __MPU_6050_H
19 
20 #include "../main.h"
21 
40 typedef enum
41 {
47 
51 typedef enum
52 {
58 
62 typedef enum
63 {
72 
76 typedef enum
77 {
85 } mpu_Axis;
86 
87 bool mpu_Init(mpu_AccelRange accelRange, mpu_GyroRange gyroRange,
88  mpu_Bandwidth bandwidth);
89 void mpu_GetAxis(mpu_Axis axis, float32_t *value);
90 void mpu_GetAcceleration(float32_t *ax, float32_t *ay, float32_t *az);
91 void mpu_GetAngularSpeed(float32_t *gx, float32_t *gy, float32_t *gz);
92 float mpu_GetTemperature(void);
93 
98 #endif
Definition: mpu_6050.h:84
bool mpu_Init(mpu_AccelRange accelRange, mpu_GyroRange gyroRange, mpu_Bandwidth bandwidth)
Initializes the MPU-6050 device.
Definition: mpu_6050.c:73
+-16 G (+-156.96 m/s^2).
Definition: mpu_6050.h:45
Cut-off freq: 42 Hz. IMU sampling freq: 1kHz.
Definition: mpu_6050.h:67
+-2 G (+-19.62 m/s^2).
Definition: mpu_6050.h:42
Cut-off freq: 188 Hz. IMU sampling freq: 1kHz.
Definition: mpu_6050.h:65
Definition: mpu_6050.h:81
Cut-off freq: 98 Hz. IMU sampling freq: 1kHz.
Definition: mpu_6050.h:66
Cut-off freq: 256 Hz. IMU sampling freq: 8kHz.
Definition: mpu_6050.h:64
Definition: mpu_6050.h:79
Definition: mpu_6050.h:80
void mpu_GetAcceleration(float32_t *ax, float32_t *ay, float32_t *az)
Acquires the acceleration from the IMU.
Definition: mpu_6050.c:208
+- 1000 deg/s.
Definition: mpu_6050.h:55
Cut-off freq: 10 Hz. IMU sampling freq: 1kHz.
Definition: mpu_6050.h:69
+- 500 deg/s.
Definition: mpu_6050.h:54
Definition: mpu_6050.h:83
mpu_Axis
Enumeration of all the measurement registers.
Definition: mpu_6050.h:76
void mpu_GetAngularSpeed(float32_t *gx, float32_t *gy, float32_t *gz)
Acquires the angular speed from the IMU.
Definition: mpu_6050.c:240
void mpu_GetAxis(mpu_Axis axis, float32_t *value)
Acquires the value of a single axis, from the IMU.
Definition: mpu_6050.c:159
Cut-off freq: 20 Hz. IMU sampling freq: 1kHz.
Definition: mpu_6050.h:68
+- 2000 deg/s.
Definition: mpu_6050.h:56
+-8 G (+-78.48 m/s^2).
Definition: mpu_6050.h:44
mpu_Bandwidth
Enumeration of the possible bandwidths.
Definition: mpu_6050.h:62
float mpu_GetTemperature(void)
Acquires the temperature from the IMU.
Definition: mpu_6050.c:265
+- 250 deg/s.
Definition: mpu_6050.h:53
mpu_AccelRange
Enumeration of the possible accelerometer ranges.
Definition: mpu_6050.h:40
Cut-off freq: 5 Hz. IMU sampling freq: 1kHz.
Definition: mpu_6050.h:70
Definition: mpu_6050.h:78
Definition: mpu_6050.h:82
mpu_GyroRange
Enumeration of the possible gyrometer ranges.
Definition: mpu_6050.h:51
+-4 G (+-39.24 m/s^2).
Definition: mpu_6050.h:43