kompost.ino 739 Bytes
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <Wire.h>

#include "wifi.h"
#include "sonar.h"
#include "pcf.h"
#include "mqtt.h"
#include "queue.h"
#include "device.h"

/* #include "control.h" */
/* #include "control.h" */

unsigned int counter = 0;


void setup(void) {
  Serial.begin(115200);
  delay(100);
  setup_wifi();
  pinMode(LED_BUILTIN, OUTPUT);

  setup_sonar();
  setup_pcf();
  setup_mqtt();
  /* setup_queue(); */
}

void loop(void) {
  MDNS.update();
  delay(500);
  counter++;

  loop_sonar(counter);

  /* String liquidLevelAvgStr(liquid_level_avg()); */
  /* mqttClient.publish(PREAMBLE T_SDIST, liquidLevelAvgStr ); */

  loop_pcf();
  loop_queue();
  loop_device();
  /* loop_control(counter); */
}