Upload files to "/"
This commit is contained in:
1 parent
6aa418b63f
commit
6a329cda03
3 files changed
+19
-1
No files matched your search
@@ -13,7 +13,7 @@ DHT dht(DHT_PIN, DHT_TYPE);
|
|||||||
|
|
||||||
// ----------- MQ-135 -----------
|
// ----------- MQ-135 -----------
|
||||||
static const int MQ_PIN = A2; // Analog pin for MQ-135 (GPIO2 on ESP32-C3)
|
static const int MQ_PIN = A2; // Analog pin for MQ-135 (GPIO2 on ESP32-C3)
|
||||||
static const int MQ_ADC_CALIBRATION = 10; // ADC baseline in clean air - ADJUST THIS
|
static const int MQ_ADC_CALIBRATION = 1900; // ADC baseline in clean air - ADJUST THIS
|
||||||
static const float MQ_AQ_MIN = 0; // Min AQ value
|
static const float MQ_AQ_MIN = 0; // Min AQ value
|
||||||
static const float MQ_AQ_MAX = 500; // Max AQ value (standard AQI scale)
|
static const float MQ_AQ_MAX = 500; // Max AQ value (standard AQI scale)
|
||||||
static const float MQ_ADC_MAX = 4095.0; // ESP32-C3 12-bit ADC max
|
static const float MQ_ADC_MAX = 4095.0; // ESP32-C3 12-bit ADC max
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
clear
|
||||||
|
echo "ESP32 IP:"
|
||||||
|
read -r srv
|
||||||
|
srv=192.168.0.187:80
|
||||||
|
while true; do
|
||||||
|
clear
|
||||||
|
ts=$(date +%Y-%m-%d-%T)
|
||||||
|
#dht=$(curl -s -X GET http://$srv/data | sed 's/{"h"/Humidity/g'| sed 's/"t_f"/Temp/g' | sed 's/,/%, /g' | sed 's/}//')
|
||||||
|
t=$(curl -s -X GET http://$srv/data | awk -F":|,|}" '{print$4}')
|
||||||
|
h=$(curl -s -X GET http://$srv/data | awk -F":|,|}" '{print$2}')
|
||||||
|
a=$(curl -s -X GET http://$srv/data | awk -F":|,|}" '{print$6}')
|
||||||
|
echo "$ts, TEMP: $t°F, HUMID: $h%, AQI: $a" | tee -a espdhtmq.csv
|
||||||
|
sleep 1
|
||||||
|
#continue
|
||||||
|
done
|
||||||
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
Reference in new issue
Block a user