STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
example3_sensor_hub.ino File Reference
#include <Wire.h>
#include "STAR_ISM330DH.h"
Include dependency graph for example3_sensor_hub.ino:

Go to the source code of this file.

Macros

#define MAG_ADDR_READ   0x61
#define MAG_ADDR_WRITE   0x60
#define MAG_READ_REG   0x00
#define MAG_READ_LEN   0x07
#define MAG_WRITE_REG   0x09
#define MAG_WRITE_DATA   0x01

Functions

void setup ()
void loop ()
bool writeControlBit (sfe_hub_sensor_settings_t toWrite)

Variables

ISM330DH myISM
sfe_ism_data_t accelData
sfe_ism_data_t gyroData
sfe_hub_sensor_settings_t readMMC
sfe_hub_sensor_settings_t writeMMC
uint8_t shRawData [MAG_READ_LEN] = {}
unsigned int magXVal
unsigned int magYVal
unsigned int magZVal
double normalizedX
double normalizedY
double normalizedZ

Macro Definition Documentation

◆ MAG_ADDR_READ

#define MAG_ADDR_READ   0x61

Definition at line 34 of file example3_sensor_hub.ino.

Referenced by setup().

◆ MAG_ADDR_WRITE

#define MAG_ADDR_WRITE   0x60

Definition at line 35 of file example3_sensor_hub.ino.

Referenced by setup().

◆ MAG_READ_LEN

#define MAG_READ_LEN   0x07

Definition at line 38 of file example3_sensor_hub.ino.

Referenced by loop(), and setup().

◆ MAG_READ_REG

#define MAG_READ_REG   0x00

Definition at line 37 of file example3_sensor_hub.ino.

Referenced by setup().

◆ MAG_WRITE_DATA

#define MAG_WRITE_DATA   0x01

Definition at line 43 of file example3_sensor_hub.ino.

Referenced by setup().

◆ MAG_WRITE_REG

#define MAG_WRITE_REG   0x09

Definition at line 42 of file example3_sensor_hub.ino.

Referenced by setup().

Function Documentation

◆ loop()

◆ setup()

◆ writeControlBit()

bool writeControlBit ( sfe_hub_sensor_settings_t toWrite)

Definition at line 227 of file example3_sensor_hub.ino.

References delay(), delayMicroseconds(), ISM_GY_ODR_OFF, ISM_XL_ODR_104Hz, ISM_XL_ODR_OFF, and myISM.

Referenced by loop(), and setup().

Variable Documentation

◆ accelData

sfe_ism_data_t accelData

Definition at line 48 of file example3_sensor_hub.ino.

◆ gyroData

sfe_ism_data_t gyroData

Definition at line 49 of file example3_sensor_hub.ino.

◆ magXVal

unsigned int magXVal

Definition at line 58 of file example3_sensor_hub.ino.

Referenced by loop().

◆ magYVal

unsigned int magYVal

Definition at line 59 of file example3_sensor_hub.ino.

Referenced by loop().

◆ magZVal

unsigned int magZVal

Definition at line 60 of file example3_sensor_hub.ino.

Referenced by loop().

◆ myISM

ISM330DH myISM

Definition at line 45 of file example3_sensor_hub.ino.

◆ normalizedX

double normalizedX

Definition at line 62 of file example3_sensor_hub.ino.

Referenced by loop().

◆ normalizedY

double normalizedY

Definition at line 63 of file example3_sensor_hub.ino.

Referenced by loop().

◆ normalizedZ

double normalizedZ

Definition at line 64 of file example3_sensor_hub.ino.

Referenced by loop().

◆ readMMC

Definition at line 54 of file example3_sensor_hub.ino.

Referenced by loop(), and setup().

◆ shRawData

uint8_t shRawData[MAG_READ_LEN] = {}

Definition at line 57 of file example3_sensor_hub.ino.

Referenced by loop().

◆ writeMMC

Definition at line 54 of file example3_sensor_hub.ino.

Referenced by loop(), and setup().