-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f6f983
commit 1b49bce
Showing
14 changed files
with
128 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef GYRO_H | ||
#define GYRO_H | ||
|
||
#include "../../Core/Inc/main.h" | ||
#include "stm32f4xx_hal.h" | ||
#include <stdint.h> | ||
#include <spi.h> | ||
#include "usart.h" | ||
#include "params.h" | ||
|
||
typedef struct { | ||
float ang_vel; | ||
float yaw_deg; | ||
} Gyro; | ||
|
||
uint8_t Gyro_ReadByte(uint8_t reg); | ||
void Gyro_WriteByte(uint8_t reg, uint8_t data); | ||
void Gyro_Init(Gyro* gyro_); | ||
void Gyro_Update(Gyro* gyro_); | ||
extern Gyro gyro; | ||
|
||
#endif /* GYRO_H */ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef PARAMS_H | ||
#define PARAMS_H | ||
|
||
#define WHO_AM_I 0x00 | ||
#define PWR_MGMT_1 0x06 | ||
#define GYRO_CONFIG_1 0x01 | ||
|
||
#define SENSITIVITY_SCALE_FACTOR 16.4 | ||
#define GYRO_OFFSET = 2.558 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.