deleted test stuff
This commit is contained in:
parent
88d4561f9e
commit
68f75f252d
@ -63,13 +63,6 @@ void connectMQTT() {
|
|||||||
mqttClient.subscribe(MQTT_PATH_SUB);
|
mqttClient.subscribe(MQTT_PATH_SUB);
|
||||||
Serial.print("subscribed to: ");
|
Serial.print("subscribed to: ");
|
||||||
Serial.println(MQTT_PATH_SUB);
|
Serial.println(MQTT_PATH_SUB);
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
//Testing read
|
|
||||||
uint16_t packetIdSub2 = mqttClient.subscribe("smartgarden/updates/esp-sebastian/brightness", 2);
|
|
||||||
Serial.print("also subscribed to: ");
|
|
||||||
Serial.println("smartgarden/updates/esp-sebastian/brightness");
|
|
||||||
=======
|
|
||||||
xTaskCreate(
|
xTaskCreate(
|
||||||
mqttLoop, /* Task function. */
|
mqttLoop, /* Task function. */
|
||||||
"mqttLoop", /* String with name of task. */
|
"mqttLoop", /* String with name of task. */
|
||||||
@ -78,7 +71,6 @@ void connectMQTT() {
|
|||||||
1, /* Priority of the task. */
|
1, /* Priority of the task. */
|
||||||
&mqttTask); /* Task handle. */
|
&mqttTask); /* Task handle. */
|
||||||
//xTimerStart(mqttProcessingTimer, 0);
|
//xTimerStart(mqttProcessingTimer, 0);
|
||||||
>>>>>>> develop
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WiFiEvent(WiFiEvent_t event) {
|
void WiFiEvent(WiFiEvent_t event) {
|
||||||
@ -114,20 +106,6 @@ void onMqttMessage(char *topic, byte *payload, unsigned int payload_length) {
|
|||||||
Serial.println(topic);
|
Serial.println(topic);
|
||||||
toggleValve();
|
toggleValve();
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
//Testing reading
|
|
||||||
String messageTemp;
|
|
||||||
for (int i = 0; i < len; i++) {
|
|
||||||
//Serial.print((char)payload[i]);
|
|
||||||
messageTemp += (char)payload[i];
|
|
||||||
}
|
|
||||||
if (strcmp(topic, "smartgarden/updates/esp-sebastian/brightness") == 0) {
|
|
||||||
Serial.println("### Received brightness value: ###");
|
|
||||||
Serial.println(messageTemp);
|
|
||||||
}
|
|
||||||
|
|
||||||
=======
|
|
||||||
if (strcmp(topic, MQTT_SOIL_PROPERTIES) == 0) {
|
if (strcmp(topic, MQTT_SOIL_PROPERTIES) == 0) {
|
||||||
Serial.println("receiving soil thresholds...");
|
Serial.println("receiving soil thresholds...");
|
||||||
Serial.println(topic);
|
Serial.println(topic);
|
||||||
@ -145,7 +123,6 @@ void onMqttMessage(char *topic, byte *payload, unsigned int payload_length) {
|
|||||||
Serial.println(err.c_str());
|
Serial.println(err.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
>>>>>>> develop
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupConnections() {
|
void setupConnections() {
|
||||||
@ -168,11 +145,6 @@ void setupConnections() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void publishMessage(const char *topic, const char *msg) {
|
void publishMessage(const char *topic, const char *msg) {
|
||||||
<<<<<<< HEAD
|
|
||||||
mqttClient.publish(topic, 1, true, msg);
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
mqttClient.publish(topic, msg);
|
mqttClient.publish(topic, msg);
|
||||||
// mqttClient.publish(topic, msg, true, 1);
|
// mqttClient.publish(topic, msg, true, 1);
|
||||||
}
|
}
|
||||||
>>>>>>> develop
|
|
||||||
|
|||||||
@ -3,15 +3,9 @@
|
|||||||
BH1750 lightMeter;
|
BH1750 lightMeter;
|
||||||
|
|
||||||
void setupLightSensor() {
|
void setupLightSensor() {
|
||||||
<<<<<<< HEAD
|
|
||||||
Wire.begin();
|
|
||||||
lightMeter.begin();
|
|
||||||
Serial.println("Light-Sensor started...");
|
|
||||||
=======
|
|
||||||
Wire.begin();
|
Wire.begin();
|
||||||
lightMeter.begin();
|
lightMeter.begin();
|
||||||
Serial.println("Sensor started...");
|
Serial.println("Sensor started...");
|
||||||
>>>>>>> develop
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float readLightSensorValue() {
|
float readLightSensorValue() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user