
/* Fill-in information from Blynk Device Info here */
#define BLYNK_TEMPLATE_ID "TMPL6McoL1I-2"
#define BLYNK_TEMPLATE_NAME "Make Proxy"
#define BLYNK_AUTH_TOKEN "GDMdCLw37_kx5kj0i7FYprwuB1FE2C6_"
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT SerialUSB


#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <Adafruit_CircuitPlayground.h>

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Hi";
char pass[] = "hi123456";

// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial1

// or Software Serial on Uno, Nano...
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 115200

ESP8266 wifi(&EspSerial);

void blynkBegin()
{ 
  // Debug console
  SerialUSB.begin(115200);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Blynk.begin(BLYNK_AUTH_TOKEN, wifi, ssid, pass);
  // You can also specify server:
  //Blynk.begin(BLYNK_AUTH_TOKEN, wifi, ssid, pass, "blynk.cloud", 80);
  //Blynk.begin(BLYNK_AUTH_TOKEN, wifi, ssid, pass, IPAddress(192,168,1,100), 8080);
  
}

int timeSinceLastPush = millis();

void blynkRunTemp(float tempData)
{
  Blynk.run();
  //Write tempData to V0.
  Blynk.virtualWrite(V0, tempData); 
 
}
