UniStarUniStar
Published © GPL3+

Sending data to smart phone using hc-05 Bluetooth module

In this tutorial, we will learn to send sensor data to a mobile phone using the hc-05 Bluetooth module.

BeginnerFull instructions provided16,692
Sending data to smart phone using hc-05 Bluetooth module

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1
Rotary potentiometer (generic)
Rotary potentiometer (generic)
×1
Resistor 1k ohm
Resistor 1k ohm
×1
Through Hole Resistor, 2 kohm
Through Hole Resistor, 2 kohm
×1
Breadboard (generic)
Breadboard (generic)
×1
Development Kit Accessory, Jumper Wire Kit
Development Kit Accessory, Jumper Wire Kit
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Schematic -

Note :
The 2k ohm resistor connects between GND -> RX
The 1k ohm resistor connects between 11 -> RX

Code

Code -

Arduino
Note :
Keep the RX and TX pins as it is rather than changing them to get the best results.
#include <SoftwareSerial.h>

SoftwareSerial bluetooth(10, 11); //RX, TX
int input;
int device = A1;

void setup() 
{
  Serial.begin(9600);
  bluetooth.begin(9600);
  pinMode(device, INPUT);
}

void loop() 
{
  input = analogRead(device);
  input = map(input, 0, 1023, 0, 180);
  bluetooth.print(input);
  bluetooth.print(";");
  Serial.println(input);
  delay(20);
}

Credits

UniStar
0 projects • 1 follower
Contact
UniStar
0 projects • 1 follower
Contact

Comments

Please log in or sign up to comment.