1

I am connecting Arduino Uno R3 with HC 08 module lie following

Arduino 5v -> HC 08 Vcc
Arduino gnd -> HC 08 gnd
Arduino Pin 5 -> HC 08 RXD
Arduino Pin 6 -> HC 08 TXD

Then I connected two LEDs to 9 and 10 pins

Then loading following sketch.

#include <SoftwareSerial.h>
int availableLEDpin = 9;
int notAvailableLEDpin = 10;
SoftwareSerial hc_08(5, 6); // RX-5, TX-6
void setup() {
 pinMode(availableLEDpin, OUTPUT);
 pinMode(notAvailableLEDpin, OUTPUT);
 Serial.begin(9600);
 hc_08.begin(9600);
}
void loop() {
 hc_08.listen();
 if (hc_08.available()) {
 Serial.println(hc_08.read());
 digitalWrite(availableLEDpin, HIGH);
 digitalWrite(notAvailableLEDpin, LOW);
 }
 else {
 digitalWrite(availableLEDpin, LOW);
 digitalWrite(notAvailableLEDpin, HIGH);
 }
 delay(100);
}

I am trying to connect to bluetooth from y iOS application. The application is searching and connecting to the HC 08 correctly. And sending data successfully - Swift code log showing sent successfully.

But back in Arduino, always led connected to pin notAvailableLEDpin is glowing and nothing is printing in serial monitor. What is wrong with my implementation?

asked Jun 27, 2017 at 17:51

2 Answers 2

1

You have the receive port on your arduino connected to the receive port on your bluetooth module. Connect pin 5 to the Tx on your module and connect pin 6 to the Rx on your module.

answered Aug 7, 2017 at 16:28
0

it's better to use digital pin 8/10 as RX, digital pin 9/11 and TX as your softwareserial pins since these pins are dedicated for softwareserial knowing you use the generic softwareserial library and mind your supply to only use 3v3 volts as much as possible, specially for the TX softwareserial pin of your arduino going to RX pin of HC08, you need to lessen the voltage output of that arduino pin into 3v3 volt also, using voltage divider. It will harm your HC08 module and might not work properly.

answered Feb 16, 2018 at 2:01

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.