Project tutorial
Control LED with Bluetooth!

Control LED with Bluetooth! © GPL3+

This tutorial explains how to connect Arduino and Bluetooth module (HC-06, but HC-05 can be used too).

  • 533 views
  • 0 comments
  • 6 respects

Components and supplies

Apps and online services

About this project

In this tutorial I will show you how to setup bluetooth communication between Arduino and HC-06 (slave device).

We will build simple circuit based on one LED with resistor and HC-06 connected to Arduino UNO. As the app used for communication between these two devices we will use app called: Smart Bluetooth - Arduino Bluetooth Serial ⚡

Download here: https://play.google.com/store/apps/details?id=com.kopunectomas.smartbluetooth

Open the app, slide through the intro, hit SEARCH button and search for nearby devices

  • When your device is found, select it by clicking on it
  • Select prefered theme (dark or light) and hold the button you selected
  • Wait for the connection, if it fails, try to reconnect
  • After successful connection, tap on the big led in the first tab (led) and check the LED connected to your Arduino if it blinks
  • If everything works and you want to edit the data sent to Arduino, unlock more features and support me, purchase premium, I will be very happy :)

See the pictures below

If you still have problems let me know devkopunec@gmail.com, I will respond within 24h hours :)

Don't forget to rate and leave a nice feedback.

Code

smartbluetooth_blinkC/C++
This is the main code for this project
/* Made by Tomas Kopunec
 *  2.22.2019
 *  
 *  By default SMART BLUETOOTH app
 *  sends 'a' when turning ON and 'b' when turning OFF
 * 
 *  If you have any questions or issues
 *  don't hesitate and send me a message here: devkopunec@gmail.com
 *  
 *  Don't forget to leave a 5-star rating and nice feedback
 *  
 *  Thanks, Kopunec
 */


const int led = 2;

void setup() {
  Serial.begin(9600);
  pinMode(led, OUTPUT);
}

void loop() {
  char c = Serial.read();
  if(c == 'a'){
    digitalWrite(led, HIGH);
  }
  else if(c == 'b'){
    digitalWrite(led, LOW);
  }
  else{
      
  }
  delay(25);
}

Schematics

Schematics Fritzing
This is the schematic for this project made in Fritzing
Schematicfritzinh jdpoottszb
Schematic EasyEDA
This is the schematic for this project made in EasyEDA
Schematic probwrutie

Comments

Similar projects you might like

Bluetooth control led with lcd led status display real time.

Project tutorial by Youssef Sabaa

  • 19,972 views
  • 4 comments
  • 40 respects

Control an LED with the Remote Control

Project showcase by Nicholas_N

  • 3,192 views
  • 2 comments
  • 9 respects

Control your LED with Cortana

Project tutorial by Mohamed Emam

  • 9,128 views
  • 7 comments
  • 21 respects

Control RGB LED by Dragging – Arduino 101 & App Inventor

Project tutorial by DFRobot and CAVEDU Education

  • 4,728 views
  • 0 comments
  • 14 respects

Bluetooth Control Multitap

Project showcase by gledel and 윤원호

  • 1,320 views
  • 0 comments
  • 5 respects
Add projectSign up / Login