Refactor project structure: update Java version, remove MQ7 files, and add BMP280 support
This commit is contained in:
@@ -1,8 +1,19 @@
|
||||
#include "main.hpp"
|
||||
|
||||
const uint32_t deviceId = getChipID();
|
||||
String response;
|
||||
|
||||
// instances
|
||||
HTTPClient httpClient;
|
||||
BMP280_DEV bme;
|
||||
|
||||
// HTTP Request
|
||||
String response;
|
||||
|
||||
// MQ7
|
||||
float sensorVolt, sensorValue, RSAir, R0;
|
||||
|
||||
// BMP280
|
||||
float temperature, humidity, pressure, altitude;
|
||||
|
||||
uint32_t getChipID()
|
||||
{
|
||||
@@ -22,13 +33,11 @@ void setup() {
|
||||
Serial.print("Error connecting to WiFi");
|
||||
}
|
||||
|
||||
MQ7_init();
|
||||
|
||||
// test get
|
||||
getRequest(httpClient, "http://172.20.10.7:8082/api/v1/sensors/1/values", response);
|
||||
deserializeSensorValue(httpClient, httpClient.GET());
|
||||
}
|
||||
|
||||
void loop() {
|
||||
MQ7_read();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user