Bluetooth Module HC-05

: COM01018
€6.02

This HC-05 Bluetooth RF transceiver module can be set as a transmitter or receiver.  It can easily transfer data wirelessly, without complex PCB layout or deep knowledge in the Bluetooth software stack.

Quantity

If you have any questions on this product please feel free to contact us.

*Disclaimer: The images are merely illustrative.

 

Even though Bluetooth Low Energy Modules available at a reasonable cost, most of these modules are not compatible with existing devices that support the classic Bluetooth. The HC-05 is an expensive module that is compatible with wide range of devices including smartphone, laptops and tablets. Adding a Bluetooth to Arduino can take your project to the next level. It opens up lots of possibilities for user interface (UI) and communication. The phone/tablet etc can act as an UI element or data logger and interpreter for your next project.

 

Pin Funtions

PinDescription
State can be connected to the Arduino Input in order to know the state of the connection. Paired or disconnected.
Rx Receive Pin of the module. It is recommended to use a voltage divider as shown in the hookup.
Tx Can be connected directly to the Arduino Rx Pin
GND connected to GND pin of Arduino
5v This breakout board has a internal 3.3v regulator on board.
EN Enables or Disables the module. Rarely Used.

 

 

http://remotexy.com/img/help/start_arduino_hc05/start_arduino_hc05_scheme.jpg

#define ledPin 7
int state = 0;

void setup() {
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, LOW);
  Serial.begin(38400); // Default communication rate of the Bluetooth module
}

void loop() {
  if(Serial.available() > 0){ // Checks whether data is comming from the serial port
    state = Serial.read(); // Reads the data from the serial port
 }

 if (state == '0') {
  digitalWrite(ledPin, LOW); // Turn LED OFF
  Serial.println("LED: OFF"); // Send back, to the phone, the String "LED: ON"
  state = 0;
 }
 else if (state == '1') {
  digitalWrite(ledPin, HIGH);
  Serial.println("LED: ON");;
  state = 0;
 } 
}

COM01018

Related products