// imports
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <Servo.h>
#include <Adafruit_CircuitPlayground.h>
// undefining because of macro collisions between adafruit CPX library and most common libraries
#undef min
#undef max

// wifi metadata
char auth[] = "0A4BP83HoqiSrO_XH46P2vueRuw6uFy4";
char ssid[] = "KRINGEL";
char pass[] = "037516364a";

//macros
#define TEMPERATURE_UPDATE_INTERVAL 10000
#define SERVO_LEFT_PIN A1
#define SERVO_RIGHT_PIN A2
#define SERVO_TOP_PIN A3
#define ESP_BAUD 115200
#define BLYNK_PRINT SerialUSB
#define EspSerial Serial1

//globals
long last_temperature_update = 0;
ESP8266 wifi(&EspSerial);
int device_lat = 0;
int device_long = 0;
Servo servo_right;
Servo servo_left;
Servo servo_top;

// function declarations
void fold();
