Bluetooth communication between Arduino Nano 33 BLE and a Bluetooth module HC-05

Hello everyone i am Currypuffer,

I am doing a project that monitors physiological signals monitoring using arduino nano 33 BLE. The project i am tasked to do is that i need to send the data collected from my main unit and transfer the data via bluetooth to an arduino uno using bluetooth. I have been stuck thinking on how i should go about doing so.

Currently i have done the basic code for the program but i am not sure how to code the part for the arduino 33 BLE to send the data its collected to another bluetooth module which is attached to an arduino uno which is also connected to a ethernet shield which will upload the data to the cloud.

Please do help me. hahahaha i am in desperate need of help cause this project is graded for my final year and i don't think i will be able to deliever the results.

pls do share some tips to help me through this :slightly_frowning_face: :slightly_frowning_face: :slightly_frowning_face: :slightly_frowning_face:

Regards,
Currypuffer

Hello Currypuffer,

This has come up a few times on the forum. The simple answer is that the BLE and HC-05 (and similar) are slightly different types of bluetooth. First of all please look at how the BLE on the Nano 33's work: ArduinoBLE - Arduino Reference

Please also see the following links:

The "full Bluetooth discussion":
https://forum.arduino.cc/index.php?topic=654631.0

Also, see my previous brief comments about using a genuine HM-10 with BLE which looks like it will work.
https://forum.arduino.cc/index.php?topic=658092

Hope that helps.
Matt

As said in PM before and confirmed by matt_lee_smith

The HC-05 seems to be a serial bus replacement using classic Bluetooth. The intention seems to have two of them and replace a serial cable with them.

The Arduino Nano 33 BLE uses Bluetooth LE. (It might be possible to change the firmware to support classic Bluetooth. This is not recommended for newbies. I have not tried this.)

Bluetooth Classic and Bluetooth LE are not compatible. There are modules that support both protocols.

With BLE you can create a much better system that is easier to program and more flexible.

The drawback of BLE is that the bandwidth is smaller than Bluetooth classic because it was designed for low power. So, you need to find out how much data your application needs to transmit.

If the bandwidth of BLE is good enough for you, I recommend to use two Arduino BLE.

To move forward, can you please describe the data you get from your sensors? e.g. example temperature range 10.0 to 50.5 degrees, steps 0.1, every 5 seconds or heartbeat 1 value every second, integer value between 30 to 220.

Have a look into the following post reply #11

https://forum.arduino.cc/index.php?topic=659562.0

The example I posted has a few characteristics that are set by the Arduino and can be read by a smartphone app.

You should load the example into your Arduino and then connect a smartphone BLE app. I use BLE Scanner on iPhone. There are others as well. This will help you understand how everything works.

So, what you want to do is create a characteristic for each of the values you measure. There are different data types available for the characteristics. Have a look into the Arduino BLE reference.

Arduino BLE Characteristic

On the way, you will need to replace any delays in your sketch. Delays are stopping the code execution. That is not good. Your Arduino should "run" around and check whether it needs to do anything. There will be processes that you will need to handle every few milliseconds while other only need to be handled every second or so. My example handles this by using a millis() timer. Your Arduino is not a human, it does not need vacation. :slight_smile: