Go Down

Topic: How to connect ESP8266 and HC05 ? (Read 1 time) previous topic - next topic

aymannox

Sep 11, 2018, 12:57 am Last Edit: Sep 11, 2018, 10:53 pm by aymannox
Hi, I want to make an iot project using Bluetooth module (HC05) and wifi module (esp8266) connected to an arduino uno , the project wait for a mobile to connect with one of the two module ( Bluetooth or wifi ) then it runs the part of the program to control a led using the module that is connected with the mobile


For that i need the code to do this  and how to connect the two models

Nick_Pyner

iot project using Bluetooth module (HC05) and wifi module (esp8266) connected to an arduino uno
This sounds like the Uno is not only redundant, but also makes things more difficult.
An ESP 32 will do it all and has a display as well.
If you don't want local display, there is probably something similar that has just WiFi and Bluetooth.

aymannox

I think in the esp32 you can't run the wifi and Bluetooth model at the same time

By the way i need the code to do this  and how to connect the two models

Wawa

WiFi and BT uses the same 2.4Ghz band, so you can't use them 'at the same time' anyway.
Leo..

Nick_Pyner

#4
Sep 12, 2018, 02:42 am Last Edit: Sep 12, 2018, 02:45 am by Nick_Pyner
I think in the esp32 you can't run the wifi and Bluetooth model at the same time
I submit "at the same time" is a relative term. It appears that you have options to use them, and therefore options not to, i.e. their use is programmable. Having said that, no code, I'm afraid. I haven't used at all mine yet, as I'm still working on my NodeMCU, and incidentally, I realise ESP32 is actually a side issue, and, since there is already an HC-05 to hand, retiring the Uno and just using ESP8266 is surely another option for OP. .

aymannox

WiFi and BT uses the same 2.4Ghz band, so you can't use them 'at the same time' anyway.
Leo..
So i can't connect the ESP8266 with hc05

Nick_Pyner

#6
Sep 12, 2018, 03:42 am Last Edit: Sep 12, 2018, 03:47 am by Nick_Pyner
There should be nothing to stop you from using ESP8266 with HC-05. There is a swag of ESP8266 modules out there. The only one I have is a NodeMCU, which is an obvious choice for this sort of thing, but I understand you already have an ESP8266, so you just need to ensure that it has sufficient pins available for serial connection - in addition to whatever else you want to do..

If you don't already have it, here is the boys' wonder book

https://tttapa.github.io/ESP8266/Chap01%20-%20ESP8266.html

aymannox

I already have a nodemcu and a hc05 , the question is how to connect and code them to solve my problem

Nick_Pyner

#8
Sep 12, 2018, 03:23 pm Last Edit: Sep 12, 2018, 03:26 pm by Nick_Pyner
Your "problem" is actually far from clear - particularly as far as your intended use of Bluetooth is concerned, not to mention the Uno. Now that, for the first time, we find you have a NodeMCU,  it might be a good time for you to re-state what you want to do.

As for connecting HC-05 thereto, NodeMCU has serial Rx/Tx pins pretty well just like any other Arduino.  The only thing faintly unusual is that you might need to find 5v power for HC-05.

My guess is that you want  to aquire data from some device via bluetooth and regurgitate to IoT via WiFi. 
Data in
Bluetooth background and also
IoT
and more

aymannox

My guess is that you want  to aquire data from some device via bluetooth and regurgitate to IoT via WiFi.  

No

The image is the best way to explain :)






Nick_Pyner

#10
Sep 13, 2018, 06:34 pm Last Edit: Sep 14, 2018, 02:39 am by Nick_Pyner
WiFi Terminal
Bluetooth terminal
HC-05 to D3,D4 on NodeMCU.
You may want to do this as an intellectual exercise, but it is rather pointless.
Arduino is redundant

aymannox

#11
Sep 13, 2018, 08:07 pm Last Edit: Sep 14, 2018, 11:27 am by aymannox
I need to use the Arduino because i want to use an LCD 16x2 ,  two stepper motor drivers and some leds .


Nick_Pyner

#12
Sep 14, 2018, 02:41 am Last Edit: Sep 16, 2018, 03:31 pm by Nick_Pyner
Quote
I need to use the Arduino because i want to use an LCD 16x2 ,  two stepper motor drivers and some leds .
You still did not help me in my problem :( , because this project is  my final year project
Really? And there's me, and probably everybody else,  thinking you were a complete beginner just playing around for no real purpose, and waiting to be spoon-fed...

ieee488

I need to use the Arduino because i want to use an LCD 16x2 ,  two stepper motor drivers and some leds .
You still did not help me in my problem :( , because this project is  my final year project

Rather pathetic that this person has no clue on how to complete his final year project.


.

Nick_Pyner

#14
Sep 14, 2018, 05:44 am Last Edit: Sep 16, 2018, 03:32 pm by Nick_Pyner
He is probably lying, or is in this position because he has been spoon-fed all along - quite likely the former, and expecting the latter. I have long suspected that, if all these clueless and barely coherent "final-year students" and "engineering PHDs" we see around here are actually what they claim to be, the world of our grandchildren is already in deep, deep shit.

Go Up