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:
@@ -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();
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "TinyGPSPlus.h"
|
||||
|
||||
#define RX 4
|
||||
#define TX 5
|
||||
#define RX 26
|
||||
#define TX 14
|
||||
|
||||
struct GPSData_t
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
@@ -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();
|
||||
Reference in New Issue
Block a user