1
0

In the current state all the timings work flawlessly but MQ is still 0.0f and GPS is not read

This commit is contained in:
Jose
2025-05-06 22:56:41 +02:00
parent fa1b457004
commit b2c7b7677b
6 changed files with 116 additions and 60 deletions

View File

@@ -1,8 +0,0 @@
#include <Wire.h>
#include <BMP280_DEV.h>
#define I2C_BMP280_ADDRESS 0x76
void BMP280_Init();
uint8_t BMP280_DataReady();
void BMP280_Read();

View File

@@ -1,7 +1,7 @@
#include "TinyGPSPlus.h"
#define RX 4
#define TX 5
#define RX 26
#define TX 14
struct GPSData_t
{

View File

@@ -5,6 +5,13 @@
#define ADC_RES 1023.0
#define RL 10000.0 // 10kΩ
#define RO 10000.0 // Resistencia del aire limpio
#define RELAY_CONTROL_PIN 2
#define MAX_SAMPLES 90
enum MQ7State_t
{
HEATING, SAMPLING
};
struct MQ7Data_t
{
@@ -12,4 +19,5 @@ struct MQ7Data_t
};
void MQ7_Init();
bool MQ7_Update();
MQ7Data_t MQ7_Read();

View File

@@ -28,8 +28,9 @@ enum AirQualityStatus {
BAD
};
void readMQ7();
void processMQ7();
void readBME280();
void readGPS();
void writeMatrix(const char* message);
void printAllData();
uint32_t getChipID();