Refactor MQ7 sensor implementation: remove old files and introduce MQ7v2 with updated reading logic
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
#define HEATER_PIN 16
|
||||
#define SENSOR_PIN 34
|
||||
|
||||
void MQ7_Init();
|
||||
void MQ7_Read(float &sensorValue);
|
||||
void pwmBitBang(int totalMs, int highPct, int cycleMs);
|
||||
10
hardware/include/MQ7v2.hpp
Normal file
10
hardware/include/MQ7v2.hpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <Arduino.h>
|
||||
|
||||
#define MQ7_PIN 34
|
||||
#define VCC 5.0
|
||||
#define ADC_RES 1023.0
|
||||
#define RL 10000.0 // 10kΩ
|
||||
#define RO 10000.0 // Resistencia del aire limpio
|
||||
|
||||
void MQ7_Init();
|
||||
void MQ7_Read(float &sensorValue);
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "BME280.hpp"
|
||||
#include "GPS.hpp"
|
||||
#include "MAX7219.hpp"
|
||||
#include "MQ7.hpp"
|
||||
#include "MQ7v2.hpp"
|
||||
|
||||
uint32_t getChipID();
|
||||
void prettyReadMQ7();
|
||||
|
||||
Reference in New Issue
Block a user