//###########################
//Andruino version rel 11.30
//A.Scavuzzo
//Dic 2021
//###########################


//release 11.30 (updated and fixed for esp8266 core 3.02)
//Added sensor BMP280
//Added sensor SHT21
//Added watchdog for Mega (not tested)


//release 11.20 (verified with Arduino IDE 1.8.13)
//OTA for ESP8266
//New timer
//Sleep mode for esp8266
//fixes: dhcp esp8266, stm32 fix interrupts


//release 11
//STM32 compatible with the new CORE lib 1.7 (timer hardware)
//TMP180 temperature and pressure sensor added (I2C)
//WifiManager updated for the new esp8266 library release
//dallas DS18B20: more sensors connected to the same bus


//instructions:
//after the sketch upload do the following:
//CASE A: ethernet: using a web browser from iPhone or PC connected to the same network, type 192.168.0.200 or 10.0.1.200 and configure email+PIN+board_name+PORT
//CASE B: node NODEMCU_ESP8266/SonOff and WIFI_ESP8266_SHIELD and ARDUINO_MK1010_WIFI: connect to the Wifi Access Point Andruino_xxxxxxxx (PASS:12345678), after that,
//        the captive portal is automatically opened (on wifi shield type 192.168.0.200 or 10.0.1.200) and so you can configure email+PIN+board_name+PORT


/*
BOARDS PACKAGES FOR ESP8266 and STM32
http://arduino.esp8266.com/stable/package_esp8266com_index.json
https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/master/STM32/package_stm_index.json
*/

//PASSWORD for direct mode (change it or leave as default)
#define ARDUINO_PASS "andrea"


//please, don't touch this version number
#define SKETCH_VERSION 11.30
#include <SPI.h>
#include "Arduino.h"
#include "boards.h"


void setup()
{
  Serial.begin(115200);
  attach_interrupt_startup_led_timer(500);
  main_Setup();
}

void loop() {
  main_Loop();
}
