Muhammad Afzal
Published © Apache-2.0

Arduino 101 BLE with Sparkfun Blynk App

This guide will demonstrate to beginners how to use Arduino 101 BLE (Bluetooth Low Energy) feature to control an LED from an Android mobile.

BeginnerProtip1 hour5,381
Arduino 101 BLE with Sparkfun Blynk App

Things used in this project

Hardware components

Arduino 101
Arduino 101
×1
LED (generic)
LED (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1
Resistor 221 ohm
Resistor 221 ohm
×1
Jumper wires (generic)
Jumper wires (generic)
×2

Software apps and online services

Arduino IDE
Arduino IDE
Blynk
Blynk

Story

Read more

Schematics

Arduino 101 BLE

Code

Arduino_101_BLE

Arduino
//#define BLYNK_DEBUG
#define BLYNK_PRINT Serial

//#define BLYNK_USE_DIRECT_CONNECT

#include <BlynkSimpleCurieBLE.h>
#include <CurieBLE.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "-------Auth Token From BlynkApp-------";

BLEPeripheral  blePeripheral;

void setup() {
  Serial.begin(1200);
  delay(1000);

  blePeripheral.setLocalName("Blynk");
  blePeripheral.setDeviceName("Blynk");
  blePeripheral.setAppearance(384);

  Blynk.begin(auth, blePeripheral);

  blePeripheral.begin();

  Serial.println("Waiting for connections...");
}

void loop() {
  Blynk.run();
  blePeripheral.poll();
}

Credits

Muhammad Afzal

Muhammad Afzal

25 projects • 117 followers
I am Software Eng having 13+ Years of experience. Hackster.io & Cayenne Mydevices Ambassador in Pakistan.

Comments