HC-05 Bluetooth Module with Arduino-MIT App Inventor
HTML-код
- Опубликовано: 2 окт 2024
- Lets learn how to use HC-05 Bluetooth Module with Arduino Uno. In the end, we'll learn from writing arduino code to create Mobile App using MIT App Inventor. The lesson start with introduction to classic HC-05 Bluetooth Module. Also we'll explore how to create Android APK and its installation on Android Smart Phone.
The process is six step as follows:
1. Setup Circuit HC-05 Bluetooth Module and Arduino Uno (VCC, Tx, Rx, GND)
2. Write Arduino Code to control LED using Mobile App
3. Create Mobile App using MIT App Inventor
4. Generate APK and send it to Phone using MIT AI2 Companion App
5. Pair HC-05 Bluetooth Module with Mobile Phone
6. Finally Test mobile App and Control LED connected to Arduino Uno
For Any issues watch troubleshoot guide: • Solved Issue: No HC-05...
Download Files from: github.com/bin...
These days very less people care about explaining what is happening in their code and how it is working and even the viewers copy the code from others without understanding it , which is bad. Thank you for explaining !!!
Ya
Totally agree
Thank you. I totally agree and it’s sad😢
@SciencewithRishit, I have a problem, I am able to pair the module with my phone but the part when he opend the app and clicks the button to find the devices, there is just blank for me, there is no device shown. Can you please help?
@@brunodragas8661 Give me some time I will tell you.
Great tutorial which covers everything you need to know to use hc-05 with your phone. It is especially good for beginners. Keep up the good work.
JESUS IS THE KING OF THE KINGS
@@xeither289 God
I've seen many such videos, but yours is the best imo because I am not familiar with programming but your video made it so simple to understand. Thank you and keep them coming 👍
JESUS IS THE KING OF THE KINGS
Thank you for this, i never thougt it could be so easy to connect my phone to arduino
Lets learn how to use HC-05 Bluetooth Module with Arduino Uno. In the end, we'll learn from writing arduino code to create Mobile App using MIT App Inventor. The lesson start with introduction to classic HC-05 Bluetooth Module. Also we'll explore how to create Android APK and its installation on Android Smart Phone.
The process is six step as follows:
1. Setup Circuit HC-05 Bluetooth Module and Arduino Uno (VCC,Tx,Rx,GND)
2. Write Arduino Code to control LED using Mobile App
3. Create Mobile App using MIT App Inventor
4. Generate APK and send it to Phone using MIT AI2 Companion App
5. Pair HC-05 Bluetooth Module with Mobile Phone
6. Finally Test mobile App and Control LED connected to Arduino Uno
Download Files from: @t
The world's best teacher thanks
Thank you Kabanda!
Your tutorial is amazing, simple and very clear. Great job
JESUS IS THE KING OF THE KINGS
Thanks, you explained so much in such little time. Thanks!
It works, but you have to unplug rx and tx wires before you upload the code. Then you can plug them back in.
Yes you are absolutely right otherwise Tx, Rx will be busy with USB connector to communicate with Computer.
waooo... that's good.. i'll also work iot...
Thanks for the detail, great stuff.
Great Tutorial! Thank you for taking the time to make this =)
Hello Bryan, Glad it was helpful!
I have also made the same circuit but it also works on ac power also check out this link
ruclips.net/video/1NLt_T59LSg/видео.html
Same code and Same app used
In link go and check out
Best video ever for beginners!!!!!!!!!!!
Thanks Osaid for wonderful comment
THANKS SIR THIS WAS VERY HELP FULL VIDEO I AM TRYING AND IT DONE IN FIRST ATTEMPT
You're welcome. Good luck for your very first Bluetooth Project
Thank you very much for such an informative tutorial.....it worked for me.....one thing I want to tell you is please don't connect HC-05 bluetooth device input directly to arduino...it's logic input level is 3.3v and arduino's output is 5v so it will damage bluetooth module...use resistor voltage divider instead to lower input voltage to pin rx of module. check following link for schemetic > ibb.co/tbZFTKk
Thanks Sameer, I appreciate your valuable time and advice.
Wish you a good time.
It is an amazing class. Thanks for sharing.
Спасибо за видео. Хоть я и не пониммю английский, но я все понял как делать.
Thank you for the video. Although I do not understand English, I understood how to do everything.
Well... There is just one thing I want to tell you: THANK YOU!
Thank you so much! I hope you enjoyed this video.
Best wishes!
@@BINARYUPDATES sir I am getting 507 Error plz help
Hi, great video but when I try to pair to the Bluetooth module to my android phone it just says pairing for a long time and then eventually stops trying to pair.
Hi Please check App settings where you've to allow permission. And then HC05 Bluetooth will work with Android App. This is because many mobile comes with high security which restrict Apps use. I hope this may help. Good luck and best wishes!
thanks , great tutorial, that's exactly what i need
You're welcome!
WHEN explaining to beginners, you should perhaps mention that communication level of the this Module is 3.3 Volts and the communication level of Arduino is 5 Volts what could burn the module. Many comments here from people who play around with already 'DEAD' (??) ..Modules.
seems like the most important project process begins at the end 23:11... need to 1st use a test app to verify the connection, before creating a new custom app... thanks.. 😉
Great point
Thank you so much, this video really helped me in my project.
Tshshdkdmdjdhdjjdjhsud
char Incoming_value = 0;
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop()
{
if(Serial.available() > 0)
{
Incoming_value = Serial.read();
Serial.print(Incoming_value);
Serial.print("
");
if(Incoming_value == '1')
digitalWrite(13, HIGH);
else if(Incoming_value == '0')
digitalWrite(13, LOW);
}
}
Hi. This is a very good video for a newbie like me. Please made more of such videos. Thank you very much. Appreciated your sharing.
Hi Steven, Glad it was helpful!
I'll surely adding more content in days to come around Arduino and Bluetooth
Best wishes
Umesh
Thanks! Super clear! Appreciated
Thank You , I was Really Helpful
Hi Ayush, Glad it helped
Hello...The module isn't visible at all in any device, phone, tablet, etc. :(( What can I do? I turned on and off my bluetooth hundreds of times, searched for the device, and I still can't see it... :((
Same problem
very good tutorial, thanks
very good
Thank you! Cheers!
I have completed all the steps but i am not getting output..In final step the mobile app is not showing the hc o5 bluetooth device ...so i am not getting output ..what to do ..please explain ...
Go to your phone settings and connect it there with the bluetooth first
Nice and detailed.
thank youu for all details
hey man thank you for sharing that awesome knowledge
i just wanna ask you something, if i want to add some feature to that app, the feature is add alarm notification in that app when the bluetooth connection suddenly lost
so, how i build the codeblock with that condition?
Complete tutorial thanks for your effort
My Pleasure Jeeva. I'm happy you found this bluetooth HC-05 with Arduino tutorial useful. Have a good day 👍
code is here
char Incoming_value = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(13,OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if (Serial.available() > 0) {
Incoming_value = Serial.read();
Serial.print(Incoming_value);
Serial.print("/n");
if(Incoming_value = '1')
digitalWrite(13,HIGH);
else if(Incoming_value = '0')
digitalWrite(13,LOW);
}
}
Very precisious expleated Thanks
Hi Vladislavhrasko, thank you so much! I'm glad you find this HC-05 Bluetooth lesson useful. Best wishes!
Hello! I tried your method but I face an issue with the LED not turning on! I even connected the resistor you proposed on the circut! Could you help me fix that issue, please?
Check your serial monitor on Arduino if you're receiving any data from Bluetooth APP. And also make sure connection between HC-05 Bluetooth module and Arduino is correct. Good luck and best wishes!
thanks for the video tutorial :)
How can you directly connect a 3 volt LED to 5 volts without burning it? And Bluetooth module also?
Man... You were born with the explanation gift. Keep up with the good work.
Hi Eduardo, Appreciate your kind words
Good luck and best wishes!
Thank you so much
excellent tutorial.... thank you...
Great tutorial! You can also change HC-05 Name and PIN. I had no idea about the MIT inventor app. Are you going to make more tutorial videos about the HC-05? I subscribed just in case you do! :)
JESUS IS THE KING OF THE KINGS
Excellente explication...Merci.
the bt module is 3.3v and arduino is 5v on rx and tx so how did you connect it without blowing it up. I've been told to use resistors to reduce voltage. can you confirm if this is necessary or not
char Incoming_value = 0;
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop()
{
if(Serial.available() > 0)
{
Incoming_value = Serial.read();
Serial.print(Incoming_value);
Serial.print("
");
if(Incoming_value == '1')
digitalWrite(13, HIGH);
else if(Incoming_value == '0')
digitalWrite(13, LOW);
}
}
Thank you!
Thank you so much for the video sir!❤
I wish I could have found this earlier🤗
Hi Astha, Glad it was helpful!
@@BINARYUPDATES Hi
it worked for me Thanks a LOT
Great Ali, Thanks for taking time to write.
Hi great videos. In my case I have a BT device that sends a string of text. How do I collect it and show it on display? Sorry but I'm really newby...
Hi Rollercoach, you can use any character LCD or OLED displays to interface with Arduino. And then over bluetooth from mobile app send string to show on display module. In Arduino code, you've to create char buffer to store received string sent by bleutooth app. And then later, using display functions you can show them. I hope this may find helpful to you. Wish you good luck and best wishes!
Hi great video, but when I click on "Led bluetooth" in the application to bring up the list of available bluetooth, no list opens. thank you in advance for your help.
I hope you've paired your HC-05 Bluetooth module with android phone. You can try with other phone, if in case version of an android is an issue. I hope this may help. Good luck!
Thank you very much
You are welcome Jananga
Thanks for the video Sir. I successfully connected my phone with Bluetooth module on circuit. But I want to put on and off the relay on that pcb what should I do now
Hi Praful, you can consider buying Relay Module there are several out there in market. And then replace LED connected to arduino with Relay Module input and you're good to go. I have posted video how to use two channel relay with NodeMCU ESP8266. You may find it useful to learn relay connections. I hope this information may help you. Good luck and best wises!
Thanks a bunch!
Why do you need the Serial.print(Incoming_value) and "
"? is it required by the blue tooth protocol to echo back what you received? I am curious because no class is listening, so they would just accumulate in the blue tooth buffer. Or are you using simultaneously the monitor through the USB interface?
THANK YOU!!!
Doesnt hc05 work on logic 3.3V? It is better to use volatge divider to Rx from hc05
Hi Oskar not 100% sure but you can check with datasheet of HC-05 Module online. I believe it will work with 3.3V as well. I hope this can help you. Thanks for your comment
Thank you sir for this helpful tutorial, is it possible to make more videos on how to create apps using MIT App inventor to display sensor values and such in the future, that would be great!
JESUS IS THE KING OF THE KINGS
Thanks. Great tutorial and very helpful for learning!
Please Ive problem " avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
Make sure you disconnect Tx and Tx Pins from HC05 Bluetooth module while uploading Arduino code. Once code is compiled and uploaded then connect Bluetooth module.
This issue come because of your Arduino IDE can't upload code on Arduino. As Tx, Rx pin is busy with HC05 Bluetooth module while uploading code.
I hope this may help you.
best wishes
Thanks to add so many details on this video, is not usual to have long videos in youtube but this one was very helpful to understand the whole picture.
I get an error code 515 stating the Bluetooth is not connected, but it is paired with my tablet and phone.
Permissions! -On my phone nothing showed up in the list until I gave the app Bluetooth Permissions.
Yes, I recently made video that shows how to enable permission on android phone so HC-05 Bluetooth module will show up in android app to connect. I have shared a link in video description. Thanks and best wishes!
Excellent! Thanks a lot!
Glad it was helpful!
Thanks, Does App Inventor create apps for iOS? if it doesn't what is the alternative?
Hi M.N
MIT App Inventor recently started supporting iOS devices as well. But I am not sure how stable it is? as I've tested only with Android. You can check on their website for more details. Here is an link for your reference: appinventor.mit.edu/blogs/evan/2021/03/04-mit-app-inventor-ios-app-store
I hope this can be useful for you
Best Wishes
Umesh
Bro thank you walla you saved me I have a competition and didn’t know how to make app thank u ❤❤❤❤❤❤❤
Hi Mehsah, I'm happy to know you found this MIT app inventor and Bluetooth HC-05 tutorial useful. Wish you all the best for your competition. And hope you'll great great bluetooth mobile app. Good luck and Best wishes!
That was nice project, but how to control motor with blouetooth. Do i need motor driver?
Hi R4F, you need motor drivers in case if you want to drive hobby DC Motor and if you just want to control Servo motor. Then you drive without motor drivers. Bluetooth has nothing to do with motors. You'll be just sending data from HC-05 to rotate motors.
@@BINARYUPDATES Thank you so much Yes I found out that after watching you video. I got idea to control train modeling that I bought for some days ago. ;-) I just purchased from aliexpress Mosfet IRLZ44N to control dc motor. I hope that will work. BTW I coulden use pro micro I dont know why. Do you ?
I wonder if you can help me please. I am having a problem. With the code line
if(Serial.available() > 0){
Incoming_value = Serial.read();
Serial.print(Incoming_value);
Serial.print("
");
if(Incoming_value == '1'){
digitalWrite(13, HIGH);}
else if(Incoming_value == '0'){
digitalWrite(13, LOW);}
}else{
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(500);
}
My LED flashes, meaning the Serial.available() =< 0. Has my bluetooth no connected? Can anyone help? Thanks.
Thanks it was there alepthol
There is server error showing 😕
Once blocks are ready u didn't say how to save it
Hi Sravani, it maybe because MIT App Inventors website server is facing issue. You can try after sometime. Its just because server could not handle traffic. And to save project, go to top menu bar (top left corner) under project there is an option to save project.....Good luck and best wishes!
Hi first of all thanks so much but can u tell me that which coding platform you are using at 7:00
Hi Rushaan, on hardware side we've used "Arduino IDE" and to make mobile app we've used "MIT App Inventor" which uses blockly from google. I hope this may answer your questions. Good luck!
Thank you Sir.Allah bless you
amazing just what i needed to know, excellent tutorial Thank you very much.by the way i sent you an email to your gmail could you please have a look.
Sir how to make RGB rice light 50 led string light control with mobile using with light effect how to make full program
I just went thru the tutorial, installed the sketch on my Arduino Uno, then connected my HC05. Then went through the process to create the app using MIT App Inventor. Set it up for Phone Size then created the .apk file. Downloaded and installed it on my Samsung A53 phone running Android 13. Paired the HC05 to my phone then started the newly installed app. Pressed the Connect button and it just brought up a black screen. No Bluetooth devices shown. Couuldn't get beyond that. Went back and compared my blocks to yours and they were identical. Then changed the size of the project to Tablet Size, built a new QR code and downloaded it onto my old Samsung Galaxy Tab A running Android 7.1.1. Paired the HC05 with the tablet and started the app. Pressed the Connect button, it displayed the HC05, selected it and it connected and worked flawlessly. Any ide why it works on one and not the other??? Thanks for any feedback.
Hi Mike, this is because the settings on Bluetooth on different version on Android varies even if the manufacturer of the hardware is same in your case its Samsung. Usually, if you change Bluetooth settings for allowing find nearby devices then HC-05 will start working with your Samsung A53 phone as well. I hope this may help you. Its all about different settings, versions of android and manufacturer of mobile phones, tablets. Have a good day, Best wishes!
@@BINARYUPDATES Thank you! I was just coming over to reply that I had found the answer. My new bluetooth app didn't have permission to look for connected devices. Added that and it works correctly.
Thanks for this nice video! I have a small question: Why do we not need an resistor for the led?
The resistor before LED will be current limiting resistor. This will protect your LED from high current flowing through circuit. Which can potentially burn your LED. Not very usual in case of Arduino but in many other circuit its good practice to use resistor before LED Protect. Thanks
oe oe tout ceux en cours de SI on est ensemble les roh 695 la trick
i really need the code cuz i cant tupe it and cha gbt is giving me wrong ones
Hi, you can download the code from GitHub link which can be found in video description. Best wishes!
Thank You
What a super tutorial...i hope you make other app inventor tutorlal like this
Thanks for the video man, very detailed and easy to understand. But if I want to catch the GFSK signal, which software should I use ? (I am doing the circuit on Proteus)
I know this is an older video, but thanks! I'm excited to use this in a project of mine.
Thank You Very Much
This inspired me to make a bluetooth airsoft gun, I made a video about it. Check it out!:) thanks!
Hey your tutorial is great and I followed along but even after connecting the hc-05 to the phone neither the external led nor the builtin led is switching on or off. Don't know where's the error.
me too
Hi I have connected everything like in video but my app does not work. When I connect Bluetooth with mobile app on android there is no response from app. Can you help me about this issue? Thank you :D
Any solution?
Nice tutorial
Hello...Thanks for this tutorial..my query is Can i connect multiple lights using this technology? What will be the changes in Arduino code?
Yes Sneha you can connect. You have to use more digital pins on Arduino board and then accordingly modify arduino sketch so that you can send commands to control them from Bluetooth app. I hope this may help you. Thanks
What kind of data can be sent to the Bluetooth module? Just 1 and 0, or can it be any string? I see you're sending the string "1" and "0" rather than an integer, but I'd like to send text like "blue" "green" "red" - more options to the Arduino rather than Binary 0 and 1.
Hi Dvance, you can send any length of string. So it will work green, red, blue text. Bluetooth can handle good amount of data to transfer at high speed. To keep it simple in example project I just sent 0 and 1 otherwise code will be longer to extract string at Arduino side and then compare to take action. I hope this may help you. Good luck and best wishes1
I want to ask if this tutorial can also be used for the nrf24l01 module?
thankss
Thank you very much, you are a life saver! :D
Hey Paloma, Glad it helped You!
After all procedures ,if we click led connection button it's not showing paired Bluetooth device name,why is it so??👀 Pls reply🙏
After clicked on list picker no any device details appears. App is working fine in other phone. In phone's Bluetooth app, list of all available/paired devices is present but not in MIT app when clicked on listpicker. Please help...
Hi Laxman, its because of your settings in the smart phone. You need to find the Bluetooth App Settings in your android phone. And then go to settings and ALLOW Bluetooth App to "Find near by devices" and then try it will work! Good luck and best wishes!
@@BINARYUPDATES THANK YOU i thought it was just outdated or something but that worked perfectly
@@BINARYUPDATES dear i would like to inform you that from Android 12 onwards some extra block code is required to get Bluetooth permission for screen. When I done the respective code then the code works else NOT. requested you please have one video one that block code for Android 12 onwards., bcoz most of people are using Android 12 above and everyone facing the issue.
LOL where is the disconnect button? How am I supposed to disconnect from the bluetooth module?
Hi Shakil, when we power off HC-05 bluetooth module it automatically disconnects otherwise you can just unpair the bluetooth device. I hope this may help you.
Best Wishes
Umesh
@@BINARYUPDATES That's not a solution. Disconnect feature must be included in the app.
Can you make a complete step by step video tutorial of how to send messages/texts to a display using an Arduino board (Nano/UNO), HC-05, MAX 7219 and MIT App creator? This would help me and a lot of people out here. Thanks.
Yes sure, thanks!
I'm on Itceh cours and its cool bro from la baguette
I have a Bluetooth control box with external relay switches, how do I go about pairing those to my main controller in App Inventor or is this functionality not available for MIT App Inventor
Hi Jonny, if your mobile can detect Bluetooth of Bluetooth control box. Then probably its possible......but again you've to check with manufacturer of that control box. Otherwise, process remains same as explained in the video to use MIT App inventor to communicate with Bluetooth devices. I hope this will be useful. Good luck!!
Nice vid. Keep it up ^^
I wanna know which app to use to and how to upload code to arduino uno
sir can please make a video on how to transfer serial monitor value to mobile app using MIT App
Hi Gayana, I'll soon making video to to send data from arduino serial monitor to Android MIT App using HC-05 Bluetooth Module
@@BINARYUPDATES thank you sir.. it would be great for my project working on bluetooth transfer
I Have Tryed this Project but Using Mobile there is No Off And On The LED