Silícios LabPCBWay
Published © GPL3+

How to change the Bluetooth Module name easily with Arduino

In this project you'll learn how to name your Bluetooth Module and detect fails in the working of your bluetooth.

BeginnerProtip1 hour4,477
How to change the Bluetooth Module name easily with Arduino

Things used in this project

Hardware components

PCBWay Custom PCB
PCBWay Custom PCB
×1
HC-06 Bluetooth Module - UTSOURCE
×1
Jumper Wires - UTSOURCE
×1
UTSOURCE Breadboard - UTSOUR
×1
Arduino UNO - UTSOURCE
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Electronic Schematic

Code

Code

Arduino
#include <SoftwareSerial.h>


SoftwareSerial mySerial(10, 11); // RX, TX
String command = ""; // Stores response of bluetooth device
// which simply allows \n between each
// response.

void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(115200);
Serial.println("Type AT commands!");
// SoftwareSerial "com port" data rate. JY-MCU v1.03 defaults to 9600.
mySerial.begin(9600);
}

void loop()
{
// Read device output if available.
if (mySerial.available())
{

while(mySerial.available())
{ // While there is more to be read, keep reading.
command += (char)mySerial.read();
}
Serial.println(command);
command = ""; // No repeats

}

// Read user input if available.
if (Serial.available())
{
delay(10); // The DELAY!
mySerial.write(Serial.read());
}

}

Credits

Silícios Lab

Silícios Lab

73 projects • 176 followers
Hello, I love program microcontrollers and works with electronic projects.
PCBWay

PCBWay

94 projects • 149 followers
We are a PCB and assembly manufacturer, As low as $5/10pcs and 24 hours delivery time. We are committed to helping creators build project.

Comments