Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

HC-05 bluetooth module communicating wit arduino uno board but not on standalone mode

Status
Not open for further replies.

punithpeshva

Newbie level 1
Newbie level 1
Joined
Jan 6, 2015
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
13
i am communicating easily with arduino uno board with hc05 but when i make it with standalone board atmega 328p its not communicating i have checked the standalone board with other programs and its working good.

The following programis here

Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <SoftwareSerial.h>// import the serial library
 
SoftwareSerial puniBT(10, 11); // RX, TX
int ledpin=13; // led on D13 will show blink on / off
int BluetoothData; // the data given from Computer
 
void setup() {
  // put your setup code here, to run once:
  puniBT.begin(9600);
  puniBT.println("Bluetooth On please press 1 or 0 blink LED ..");
  pinMode(ledpin,OUTPUT);
}
 
void loop() {
  // put your main code here, to run repeatedly:
   if (puniBT.available()){
BluetoothData=puniBT.read();
   if(BluetoothData=='1'){   // if number 1 pressed ....
   digitalWrite(ledpin,1);
   puniBT.println("LED  On D13 ON ! ");
   }
  if (BluetoothData=='0'){// if number 0 pressed ....
  digitalWrite(ledpin,0);
   puniBT.println("LED  On D13 Off ! ");
  }
}
delay(100);// prepare for next data ...
}
please help me out.:( :smiley-sad-blue:  :'(

 

Did you check for a header file that includes the function(s) that end with BT?
Maybe because of that,your system is not working...
And can you explain what does the program do from line(s) 16 to 24?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top