Define Blynk Objects

The first thing we will need to do is to define the Blynk objects that give authentication to the Blynk cloud and connect the template. This is where we will copy and paste the firmware configuration code that we discussed earlier.

You will also need your device Authentication Token which can be found in device info.

Place this at the head of your code under your comment header.

// Firmware Configuration
#define BLYNK_TEMPLATE_ID "Enter your template ID here"
#define BLYNK_DEVICE_NAME "Enter your device name here"
#define BLYNK_AUTH_TOKEN  "Enter your device auth token here"

#include <blynk.h> //Blynk library 

We added the Blynk library in a early step, just move it down below your firmware configuration definitions.

Last updated