How to use Arduino R4 Wifi, specifically the bluetooth feature

Hi I am trying to make a device that uses esp32 (arudino R4 wifi, but will change to esp32 later) to connect to a HC-05 via bluetooth how would I do this.

(I originally posted another form trying to connect HC-05 to HC-05 but it never worked so I am trying this method as well)

This here is the Arduino documentation for the R4 WiFi.
UNO R4 WiFi | Arduino Documentation
And here is the User manual.
Arduino UNO R4 WiFi User Manual | Arduino Documentation

The user manual has an example code for using bluetooth.

would I be able to connect this R4 to a hc-05? (wirelessly)

The UNO R4 WIFI only supports BLE, and the HC-05 only supports classic Bluetooth, so this will not work.

You could connect another HC-05 to the UNO R4 as one would for any other Arduino, but I assume this is not what you want.

Please explain more about the overall goal of your project.
Why do you need to use an HC05 and not just two esp32 units communicating with BT.

The fact that you failed in your earlier attempts to get two HC05's attached to Arduinos connected and communicating (which is a well documented frequent application) does not bode well for your project.

I agree with @cattledog.

An alternative to Bluetooth would be using two WiFi-enabled modules, such as the ESP32, without dealing with external modules, such as the HC-05. Bluetooth, in general, is a pain in the rear to understand, and BLE is much worse than classic Bluetooth.

Here is an article that explains connecting two ESP32s using WIFI. You can probably substitute one of the ESP32s with the UNO R4 WIFI.

1 Like

There is also a protocol called ESPNOW written by Espressif. It works with the ESP32 and ESP8266.

Hopefully, this will not send you down another rabbit hole, but here are a couple of YouTube videos that help explain it.

https://www.youtube.com/watch?v=Ydi0M3Xd_vs

https://www.youtube.com/watch?v=_eHe7ViXyY8

If you want to play inexpensively, you can order two esp-8266 modules for about $12.00 U.S.

Ok so at the moment I am trying to make a car that is controlled wirelessly via bluetooth.
I was initially watching a tutorial on how to do this, but the way the tutorial does it it connects a phone to the hc05 and the phone would send commands to the hc05 (via some app you download) but I wanted to do it differently where I would make my own controller (so that's where the hc05 - hc05 idea came from also why I am using a hc05 in the first place)

at the moment I have an arduino with a sensor shield and that is connected to a motor driver (connected to 4 other motors), an ultrasonic sensor, a servo and the hc05 which would be used to receive commands from the phone. I have tested (individually so I understand how they work) the ultrasonic sensor and servo and just have the hc05 and motor driver to go. I was doing research today and found out about the ESPNOW which seems very useful. The main reason I did not try esp32 to esp32 is because initially I wasn't planning on making a controller.

Using an Android phone with an HC05 is the most simple and reliable method for a "controller".

but the way the tutorial does it it connects a phone to the hc05 and the phone would send commands to the hc05 (via some app you download) but I wanted to do it differently where I would make my own controller

There are several apps available to control an arduino BT car. Which ones did you try, and what functions were missing?

If there is not an existing app which does what you want to do, then creating a custom app using MIT App Inventor is another option.

Using an Android phone with an HC05 is the most simple and reliable method for a "controller".

hmm ok, Ill try get that working then attempt the HCC05 to HC05. I really want to do something like this so I can make a PCB out of it.
Iv like wasted 16+ hours trtying to fix this stupid bugs idk why it even happens in the first place. ty tho ill try that first- controller app

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.