Sie sind auf Seite 1von 6

Arduino and Bluetooth

http://english.cxem.net/arduino/arduino4.php

and Bluetooth http://english.cxem.net/arduino/arduino4.php Arduino and Bluetooth GPS Bluetooth Kucari.com
and Bluetooth http://english.cxem.net/arduino/arduino4.php Arduino and Bluetooth GPS Bluetooth Kucari.com
and Bluetooth http://english.cxem.net/arduino/arduino4.php Arduino and Bluetooth GPS Bluetooth Kucari.com

Arduino and Bluetooth

GPS Bluetooth Kucari.com

www.kucari.com/GPS-Bluetooth Jual GPS Bluetooth Holux, Garmin Dapat dikirim keseluruh Indonesia

Library RFID Systems

www.fetechgroup.com.au Self Serve Check Out - Self Returns Book Sorters, Stock Take, Payments

Asian Wealth Management

www.pwmnet.com/Asia Professional Wealth Management Asia Insight for Asian asset managers

Gaming Headset

www.hardwarezone.co.id/mouse_kb Compare Features, Prices & More. Browse HardwareZone Today.

Category: Main page

& More. Browse HardwareZone Today. Category: Main page Arduino China's Bluetooth Serail modules are very cheap:

Arduino

China's Bluetooth Serail modules are very cheap: 5-10$ per module. You can find them on eBay: Bluetooth RS232, Bluetooth Serial, HC-03, HC-04, HC-05, HC-06.

RS232, Bluetooth Serial, HC-03, HC-04, HC-05, HC-06. Most modules use a chip BC417 and Flash memory.

Most modules use a chip BC417 and Flash memory. Specification:

CSR chip: Bluetooth v2.0 Wave band: 2.4GHz-2.8GHz, ISM Band Protocol: Bluetooth V2.0 Voltage: 3.3 (2.7V-4.2V) Current: Paring - 35mA, Connected - 8mA

The command set of HC-03 and HC-05 are more flexible than HC-04 and HC-06 modules.

We'll be working with the module HC-06. Circuit diagram:

Arduino and Bluetooth

http://english.cxem.net/arduino/arduino4.php

and Bluetooth http://english.cxem.net/arduino/arduino4.php HC-04/HC-06 pins: UART_TX (pin 1), UART_RX (pin 2), UART_CTS

HC-04/HC-06 pins:

UART_TX (pin 1), UART_RX (pin 2), UART_CTS (pin 3), UART_RTS (pin 4) - UART. 3,3V (pin 12) - Power 3.3V. GND (pin 13) - GND. PIO1 (pin 24) - LED working mode indicator

HC-03/HC-05 pins:

UART_TX (pin 1), UART_RX (pin 2), UART_CTS (pin 3), UART_RTS (pin 4) - UART. PIO8 (pin 31) - LED1 working mode indicator. PIO9 (pin 32) - LED2. Before paired, it output low level. Once the pair is finished, it output high level. PIO11 (pin 34) - KEY. Mode switch input. If it is input low level, the module is at paired or communication mode. If it’s input high level, the module will enter to AT mode.

See PDF documentation.

the module will enter to AT mode. See PDF documentation. We will connect the Bluetooth module

We will connect the Bluetooth module HC-06 to the Arduino Nano V3:

3.3V Arduino pin - to 12 pin HC-06 Bluetooth module GND Arduino pin - to 13 pin HC-06 Bluetooth module TX Arduino pin - to 2 pin HC-06 Bluetooth module (RX) RX Arduino pin - to 1 pin HC-06 Bluetooth module (TX)

Arduino and Bluetooth

http://english.cxem.net/arduino/arduino4.php

and Bluetooth http://english.cxem.net/arduino/arduino4.php Transfer data from the Arduino via Bluetooth Program to send

Transfer data from the Arduino via Bluetooth

Program to send data from the Bluetooth module to the computer

1

int cnt = 0;

// Counter

2

3

void setup() {

4

Serial.begin(9600);

// Initialization

5

}

6

7

void loop() {

8

cnt++;

9

Serial.print("Hello BB from Arduino! Counter:"); // print message

10

Serial.println(cnt);

// print counter

11

delay(1000);

// wait 1 sec

12

}

counter 11 delay (1000); // wait 1 sec 12 } ? On PC, I use cheapest

?

On PC, I use cheapest Bluetooth USB Adapter. After power on, you will be prompted to enter your Bluetooth devices pairing code/password. The default for most Bluetooth devices is 1234. If the pairing is successful, you will see a message.

Now the Bluetooth device and PC are connected.

Arduino and Bluetooth

http://english.cxem.net/arduino/arduino4.php

and Bluetooth http://english.cxem.net/arduino/arduino4.php To view the received data we need a Terminal on PC. I use

To view the received data we need a Terminal on PC. I use the Tera Term. After starting the program, select the virtual COM-port of the PC Bluetooth device.

You will see counter from Arduino:

the PC Bluetooth device. You will see counter from Arduino: Bi-directional communication between PC and Arduino

Bi-directional communication between PC and Arduino via Bluetooth

To the diagram, I added the LED connecting it to the 12 pin Arduino, via current-limiting resistor. But you can use build-in LED (13 pin). Our program is very simple:

1

char incomingByte; // incoming data

 

2

int

LED = 12;

// LED pin

3

 

4

void setup() {

 

5

Serial.begin(9600); // initialization

 

6

pinMode(LED, OUTPUT);

 

7

Serial.println("Press 1 to LED ON or 0 to LED OFF

");

8

}

9

10

void loop() {

 

11

if (Serial.available() > 0) {

// if the data came

12

 

incomingByte = Serial.read(); // read byte

 

13

if(incomingByte == '0') {

 

14

 

digitalWrite(LED, LOW); // if 1, switch LED Off

 

15

Serial.println("LED OFF. Press 1 to LED ON!"); // print message

16

 

}

17

if(incomingByte == '1') {

 

18

 

digitalWrite(LED, HIGH); // if 0, switch LED on

 

19

Serial.println("LED ON. Press 0 to LED OFF!");

20

 

}

21

}

22

}

See screenshot:

?

Arduino and Bluetooth

http://english.cxem.net/arduino/arduino4.php

and Bluetooth http://english.cxem.net/arduino/arduino4.php Video: Android To work with the Android you will need

Video:

Android

To work with the Android you will need program: Bluetooth Terminal . Click in menu "Connect a device - Secure" and select our device "BOLUTEK". See video:

Download source code for Arduino

Author: Koltykov A.V.

IC Programmer+Adapter

Xeltek.com/ProgrammerAdapter-Saving Buy Xeltek Programmer & Adapter Together & Get Bundle Discount !

0

Arduino and Bluetooth

http://english.cxem.net/arduino/arduino4.php

Mike 2013-01-31 14:26:18

Mike 2013-01-31 14:26:18 +1

+1

Mike 2013-01-31 14:26:18 +1

Works but does not maintain connection. Whenever is left idle for about 5 seconds it drops connection.

 

[Reply] [Reply with quote]

Max 2013-01-29 04:36:09

Max 2013-01-29 04:36:09 -1

-1

Max 2013-01-29 04:36:09 -1

How I "select the virtual COM-port at Bluetooth device", I see de BT in Arduino, but can't communicate.

 

[Reply] [Reply with quote]

 

Admin 2013-01-29 09:25:08

  Admin 2013-01-29 09:25:08 0

0

0

Do you paring BT devices? Do you see counter data from Arduino?

[Reply] [Reply with quote]

Jacob 2013-01-14 02:30:39

Jacob 2013-01-14 02:30:39 +1

+1

Jacob 2013-01-14 02:30:39 +1

I was having an issue with getting data from HC-05 TX to Arduino RX and I added a 2.2K resistor from the HC-05 TX pin to GND to fix it.

 

[Reply] [Reply with quote]

sean 2012-10-30 15:35:55

sean 2012-10-30 15:35:55 +2

+2

sean 2012-10-30 15:35:55 +2

hello can you explain if any extra resistor is required for the RXD to connect to ARDUINO TX http://www.instructables.com/id/Use-your-android-ph one-sensors-on-the-arduino-/step3/The-level-s

 

[Reply] [Reply with quote]

 

Admin 2012-10-30 15:47:54

  Admin 2012-10-30 15:47:54 +1

+1

  Admin 2012-10-30 15:47:54 +1

I try use resistor, but module not worked. HC-06 work ferfect without any resistors.

[Reply] [Reply with quote]

Pages: [1]

Leave a comment

Your name:

Your Email:

Comment:

Type the characters: *

Your name: Your Email: Comment: Type the characters: * Refresh Size Add [Ctrl+Enter] Copyright 1999-2013 "

Refresh

name: Your Email: Comment: Type the characters: * Refresh Size Add [Ctrl+Enter] Copyright 1999-2013 "
name: Your Email: Comment: Type the characters: * Refresh Size Add [Ctrl+Enter] Copyright 1999-2013 "
Size
Size
Your Email: Comment: Type the characters: * Refresh Size Add [Ctrl+Enter] Copyright 1999-2013 "
Add [Ctrl+Enter]
Add [Ctrl+Enter]

Copyright 1999-2013 "english.cxem.net" All rights reserved

Size Add [Ctrl+Enter] Copyright 1999-2013 " english.cxem.net" All rights reserved 6 of 6 02/03/2013 12:08 AM