#include <Arduino.h>
#include "board.h"
#include "display.h"
#include "leds.h"
#include "measure.h"

uint64_t looptime = 0;

void setup()
{
  // put your setup code here, to run once:
  initBoard();
  initDisplay();
  initLeds();
  initMeasure();
  looptime = millis();
}

void loop()
{
  // put your main code here, to run repeatedly:
  looptime = micros();

  handleDisplay();
  handleLeds();
  handleMeasure();

  Serial.printf("T=%4.2f\n", (double)(micros() - looptime)/1000);
}