I would really appreciate if someone help me to change code to use with bluetooth module HC-06.
If you want to have the HC-06 send the value to something that is paired and connected to the HC-06, then I think no changes are needed.
Disconnect the HC-06 from Rx and Tx when you download the code, and then reconnect it. The Serial.print(analogRead(A1)) should go to both the monitor and the HC06 which will send the value to the receiver.
With this setup you will not be able to use the monitor to send data to the Arduino, only receive. You can send to the Arduino from the device paired and connected to the HC06.
What were you thinking that the HC-06 module was going to do? Take some information from somewhere? Send some information to somewhere? Your requirements could do with a bit more detail.
slipstick:
What were you thinking that the HC-06 module was going to do? Take some information from somewhere? Send some information to somewhere? Your requirements could do with a bit more detail.
Steve
I just want it to send the data, received from ecg module (AD8232), then using processing app I will get the results I need
cattledog:
If you want to have the HC-06 send the value to something that is paired and connected to the HC-06, then I think no changes are needed.
Disconnect the HC-06 from Rx and Tx when you download the code, and then reconnect it. The Serial.print(analogRead(A1)) should go to both the monitor and the HC06 which will send the value to the receiver.
With this setup you will not be able to use the monitor to send data to the Arduino, only receive. You can send to the Arduino from the device paired and connected to the HC06.
So, if I need to send received data to PC, than I dont need to change anything?
So, if I need to send received data to PC, than I dont need to change anything?
I have only used the bluetooth modules with a phone, but if the PC's bluetooth can find and pair with the HC06 you should be able to receive data into some terminal program which can read the pc's bluetooth serial port.
What happens when you try?
It is recommended to use a voltage divider between the Arduino Tx and the module Rx so that the HC06 Rx only sees 3.3v. There are many online tutorials about how to do this.
cattledog:
I have only used the bluetooth modules with a phone, but if the PC's bluetooth can find and pair with the HC06 you should be able to receive data into some terminal program which can read the pc's bluetooth serial port.
What happens when you try?
It is recommended to use a voltage divider between the Arduino Tx and the module Rx so that the HC06 Rx only sees 3.3v. There are many online tutorials about how to do this.
Yes, processing is gonna get the data from the port, still I need to send it
The problem is that I can't try now, so I want at least to make it theoretically right
The HC06 bluetooth module with the two chips(which run at 3.3v) is usually soldered onto a breakout board which has the Vcc and ground pins for power connection.
Typically those boards take 5v input, and it is usually silkscreened on the board. There are versions of the HC06 breakout board which have silkcreened on them power = 3.6v -- 6V