Using the HC-05 Bluetooth module with the OpenRB 150

Hello, everyone!

Im trying to use Serial2 on the OpenRB 150 with an HC-05 to achieve two way Bluetooth communication with another module of the same configuration.

I have the bluetooth modules set up in master and slave mode and I can see that they pair when powered on when as the led’s on the HC-05’s sync up.

I was hoping somebody could provide me with some example code to achieve a basic two way communication between my modules so I can have a play.

That being said I’ve seen some accounts of people having troubles using the MKR ZERO (on which I understand the openRB 150 is based) with an HC-05 module.
Would it be easier to use the robotis BT410 modules as demonstrated in First look at OpenRB-150 to achieve communication between my modules?

I have not used the HC-05, so I can’t help you on that topic.

But if you are thinking about using the various Serial ports on the OpenRB-150 with BT-210/410, then you can read up on the free Kindle Sample of my recent book “Using Arduino with Robotis Systems”. Amazon happens to be very “generous” with my book, so all the relevant sections about using Serial2, Serial3, Serial4 and Serial5 are described in that free sample (along with comparison to a BLE module).

In another section of Chapter 2 (not shown), an approach for communications between two OpenRB-150s is described using a “wired” approach, as both modules are used on the same physical robot for my situation (thus no need for Bluetooth).

You can take a look at the free sample and then decide on which approach you want to take for your own project.