BRLAB DOCS
HomeTutorialsHardware
IoT Relays with Particle and Blynk
IoT Relays with Particle and Blynk
  • Introduction
  • Getting Started
    • What You Will Need
    • Claim Your Particle Device
    • Setup Your Blynk Account
  • Creating the Web Dashboard
    • Template
    • Data Streams
    • Widgets
    • Widget Settings
    • Finished Web Dashboard
  • Creating the Mobile App
    • Blynk.App
    • Widgets
    • Widget Settings
  • The App Code
    • Particle Web IDE
    • Blynk Library
    • Writing The Code
      • Comment Header
      • Define Blynk Objects
      • Define Global Variables
      • Void Setup()
      • Void Loop()
      • BLYNK_WRITE()
    • Application Code
    • Control The World Around You
  • Resources
    • Blynk Documentation
    • Particle Documentation
Powered by GitBook
On this page
  1. The App Code

Blynk Library

PreviousParticle Web IDENextWriting The Code

Last updated 2 years ago

The first thing we will need to do is add the Blynk library to the code. This will simplify our code as it will take care of all of the logic for interfacing with the Blynk Cloud.

To add libraries to code click on the ribbon in the bottom left hand side of the IDE. This will bring up a new window with a large searchable list of community libraries that can be used. Most likely Blynk will be one that is listed on the first page.

Click on the Blynk library and select which project to add it too. You will want to add it to the project that you just created. In my case Blynk_Relay_Tutorial.

Once you add the library it will look like this at the top line of you code.

// Blynk Library
#include <blynk.h>