IZAR Flight Controller 1.0.0
IZAR Flight Controller running with an ESP32.
sensors_reading.h File Reference
#include "mpu6050.h"
Include dependency graph for sensors_reading.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SensorDataQueue_t
 Data packet structure for passing sensor readings between tasks. More...

Macros

#define ACTIVATE_MPU6050   1
 Enable MPU6050 sensor for linear acceleration and angular rotation.
#define ACTIVATE_MS5611   1
 Enable MS5611 pressure and temperature sensor.
#define ACTIVATE_SD   1
 Enable SD card logging for saving flight data.
#define ACTIVATE_BLE   1
 Enable BLE control and telemetry transmission.
#define I2C_SCL_IO   22
 I2C bus configuration for sensor communication with MS5611 and MPU6050.
#define I2C_SDA_IO   21
#define I2C_NUM   I2C_NUM_0
#define I2C_FREQ_HZ   400000
#define TAG_SENSORS_READING   "Sensors Reading"

Enumerations

enum  ROCKET_STATUS_T {
  PREPARING_FOR_FLIGHT , READY_TO_FLY , ASCENDING , DESCENDING_WITH_DROGUE ,
  DESCENDING_WITH_MAIN , LANDED
}
 Rocket flight status states. More...

Functions

void sensors_reading ()
 Main FreeRTOS task function for reading all sensors.

Macro Definition Documentation

◆ ACTIVATE_BLE

#define ACTIVATE_BLE   1

Enable BLE control and telemetry transmission.

◆ ACTIVATE_MPU6050

#define ACTIVATE_MPU6050   1

Enable MPU6050 sensor for linear acceleration and angular rotation.

◆ ACTIVATE_MS5611

#define ACTIVATE_MS5611   1

Enable MS5611 pressure and temperature sensor.

◆ ACTIVATE_SD

#define ACTIVATE_SD   1

Enable SD card logging for saving flight data.

◆ I2C_FREQ_HZ

#define I2C_FREQ_HZ   400000

◆ I2C_NUM

#define I2C_NUM   I2C_NUM_0

◆ I2C_SCL_IO

#define I2C_SCL_IO   22

I2C bus configuration for sensor communication with MS5611 and MPU6050.

◆ I2C_SDA_IO

#define I2C_SDA_IO   21

◆ TAG_SENSORS_READING

#define TAG_SENSORS_READING   "Sensors Reading"

Enumeration Type Documentation

◆ ROCKET_STATUS_T

Rocket flight status states.

Enumerates the possible phases of the rocket's flight sequence.

Enumerator
PREPARING_FOR_FLIGHT 

Manipulating the rocket.

READY_TO_FLY 

Set in the launch rod ready for liftoff.

ASCENDING 

Rocket is ascending.

DESCENDING_WITH_DROGUE 

Apogee detected and falling with drogue chute.

DESCENDING_WITH_MAIN 

Falling with main chute.

LANDED 

Rocket landed.

Function Documentation

◆ sensors_reading()

void sensors_reading ( )

Main FreeRTOS task function for reading all sensors.

Initializes peripherals, reads sensor data in an infinite loop and pushes new data into the queue to notify the flight controller.

< esp_err_t value indicating success (no error)

< esp_err_t value indicating success (no error)

Here is the call graph for this function:
Here is the caller graph for this function: