/* Licensed under the MIT License. */

#include <stdlib.h>
#include <stdio.h>

#include "esp32_azureiotkit_sensors.h"
#include "esp_err.h"
#include "nvs_flash.h"

// Macro to help obtain the length of a string define discounting the byte used for null-terminator (\0).
#define lengthof(x)                      (sizeof(x) - 1)

#define OLED_SPLASH_MESSAGE              "Hello World!"

int last_sensor_read_time =              0;
const int sensor_read_frequency_millis = 5000;
bool led1_on = false;
bool led2_on = true;

void setup() {
    esp32_azureiotkit_initialize_sensors();

    esp32_azureiotkit_oled_clean_screen();
    esp32_azureiotkit_oled_show_message((uint8_t*)OLED_SPLASH_MESSAGE, lengthof(OLED_SPLASH_MESSAGE));
}

void loop() {
  delay(10);
}
esp:VIN
esp:GND.2
esp:D13
esp:D12
esp:D14
esp:D27
esp:D26
esp:D25
esp:D33
esp:D32
esp:D35
esp:D34
esp:VN
esp:VP
esp:EN
esp:3V3
esp:GND.1
esp:D15
esp:D2
esp:D4
esp:RX2
esp:TX2
esp:D5
esp:D18
esp:D19
esp:D21
esp:RX0
esp:TX0
esp:D22
esp:D23
oled1:DATA
oled1:CLK
oled1:DC
oled1:RST
oled1:CS
oled1:3V3
oled1:VIN
oled1:GND