This commit is contained in:
coelner 2019-05-23 19:38:55 +02:00
commit 2e1efab6dc
3 changed files with 3 additions and 14 deletions

5
.gitignore vendored
View File

@ -1,8 +1,3 @@
<<<<<<< HEAD
#hide credentials from git
secrets.h
=======
*.bin
secrets.h
>>>>>>> gitignore added

View File

@ -75,7 +75,7 @@ const bool metric = true;
#ifdef BATTERY_USE
#define SLEEP_TIME_LOW_BAT 60*SLEEP_TIME // sleep 3600s(60min) after measurement
#define BATT_WARNING_VOLTAGE 270 // Voltage for Low-Bat warning in mV --rember the drop-out of the voltage regulator -- Be aware not to measure the VCC!
#define BATT_MEASUREMENT_OFFSET 20 //Meh, somewhere and somehow is something not that well...
#define BATT_MEASUREMENT_OFFSET 30 //Meh, somewhere and somehow is something not that well...
#endif
/************************* WiFi Client *********************************/
@ -94,16 +94,10 @@ IPAddress mqttBroker(10, 0, 4, 1); //failsafe
const int FW_VERSION = 10;
const char* fwUrlBase = "http://10.0.4.2/fota/";
/************************* MQTT Broker Setup *********************************/
<<<<<<< HEAD
#define name "test"
//see secrets.h
char MQTT_CLIENTID[10];
const char MQTT_WILL_TOPIC[] = "test/sys/will";
=======
#define name "bathroom"
char MQTT_CLIENTID[10];
const char MQTT_WILL_TOPIC[] = "bathroom/sys/will";
>>>>>>> gitignore
const int MQTT_WILL_QOS = 0;
const int MQTT_WILL_RETAIN = 0;
const char MQTT_WILL_MESSAGE[] = "Finally died...";

View File

@ -160,7 +160,7 @@ uint32_t voltageDivCorrelation(uint32_t u3) {
//ToDo: Not working! adc contains millivoltage at native adc port
uint32_t adc = map (u3 - offset, 0, 1023, 0 , 1000);
const uint32_t r1 = 390;
const uint32_t r1 = 395;
const uint32_t r2 = 220;
const uint32_t r3 = 100;
uint32_t rges = r1 + r2 + r3;
@ -671,7 +671,7 @@ void setup() {
Serial.print(F("ADC_measurement: \t\t\t"));
Serial.println (String(adc));
Serial.print(F("VoltageDividerCorrelation in V: \t"));
Serial.println(String(voltageDivCorrelation(adc) - BATT_MEASUREMENT_OFFSET));
Serial.println(String(voltageDivCorrelation(adc)));
#endif
yield();
delay(10);