This commit is contained in:
Flinner Yuu 2022-12-11 04:13:35 +03:00
parent b590561c0d
commit b4c9480713
Signed by: flinner
GPG Key ID: 95CE0DA7F0E58CA6
1 changed files with 1 additions and 2 deletions

View File

@ -9,7 +9,7 @@
#define CHARGE_PIN 5
#define MEASURING_PIN 36
#define RESISTOR_VALUE 1e6
#define MQTT_SERVER "test.mosquitto.org"
#define MQTT_SERVER "mqtt.ammar.engineer"
#define MQTT_PORT 1883
#define MQTT_TOPIC_CAPCITANCE "pipe_system/capacitance"
#define DEVICE_ID "PIPE_01"
@ -80,7 +80,6 @@ float capacitance(int discharge_pin, int charge_pin, int measuring_pin) {
elapsed_time = millis() - start_time;
nanoFarads = ((float)elapsed_time / RESISTOR_VALUE) * 1e6;
Serial.println((long) nanoFarads);
delay(1000);
return nanoFarads;
};