Adding Bluetooth to Your Arduino Project with an HC-05 or HC-06 Bluetooth Module

  Переглядів 102,994

Bytes N Bits

Bytes N Bits

День тому

Adding a wireless connection to your Arduino projects opens up a whole range of new possibilities. In this tutorial we'll use a an HC-05 or HC-06 module to add a Bluetooth connection so we can send and receive data through a mobile phone app.
I'll show you how to wire in the module, some tips on what serial ports to use to connect the Arduino to it and then write a simple sketch to show the Arduino talking to your phone over the Bluetooth link.
Don't forget to visit my website for circuit diagrams, code downloads and hints and tips.
bytesnbits.co.uk/adding-bluet...
Bluetooth Modules
Amazon:
HC-05 module : amzn.to/3t6CjZE
HC-06 (slave only) : amzn.to/3iY3jpE
eBay:
HC-05 : ebay.us/lUhUPn
HC-06 (slave only) : ebay.us/I4cPwi

КОМЕНТАРІ: 147
@Ilgenfixit80
@Ilgenfixit80 Рік тому
This is extremely helpful and well done. Thank you for the work you've put into this.
@BytesNBits
@BytesNBits Рік тому
Glad you enjoyed it!
@thapaharis
@thapaharis 5 місяців тому
great tutorial that goes in depth to explain; needs stuffs like that teaches under the hood mechanisms. Thank you for content
@BytesNBits
@BytesNBits 5 місяців тому
Glad it was helpful!
@abdallahhachem4985
@abdallahhachem4985 Рік тому
Great Video!!! i did the steps and it worked. Just FYI make sure you put resistors between the bluetooth rx to arduino tx. two different resistors of 2.2k and 6k would work. the reason is that you need to adjust the 5v to 3.3v.
@BytesNBits
@BytesNBits Рік тому
Thanks for the tip!
@abdallahhachem4985
@abdallahhachem4985 Рік тому
@@BytesNBits do you mind if i can connect you on email or whatsapp? i am working on a project using arduino and i was wondering if you can help me with a few things
@BenParisi
@BenParisi 8 місяців тому
absolutely perfect. Thanks so much!
@BytesNBits
@BytesNBits 8 місяців тому
You're very welcome!
@Brandon-qp7gq
@Brandon-qp7gq 8 місяців тому
Great tutorial, thank you!
@BytesNBits
@BytesNBits 7 місяців тому
You're very welcome!
@walterkimball9399
@walterkimball9399 Рік тому
First off this was a great video series and was glad to find videos that really go in-depth into explaining how to implement things like Bluetooth. I do want to know if this tutorial will work with any BLE Bluetooth modules(preferably HC-08) since I believe that iPhone only connects with BLE. I want to use the App inventor to create a remote for my projects in my Engineering class in school and only have a iPhone. Thank you.
@BytesNBits
@BytesNBits Рік тому
Hi. This should work fine with any of the Bluetooth modules that use a serial link. The module tends to take care of all of the Bluetooth bits. Good luck with the project!
@danger0679
@danger0679 Рік тому
Video provided great help for our project. Thanks
@BytesNBits
@BytesNBits Рік тому
Glad it helped
@winna101ify
@winna101ify Рік тому
Very well explained video, thank you.
@BytesNBits
@BytesNBits Рік тому
No problem.
@nucspartan321
@nucspartan321 Рік тому
THANK YOU! Great video
@BytesNBits
@BytesNBits Рік тому
Glad it was helpful!
@surendrakumarsahoo9878
@surendrakumarsahoo9878 2 роки тому
Excellent Sir
@BytesNBits
@BytesNBits 2 роки тому
No problem. I hope you found it useful.
@matik09
@matik09 7 місяців тому
I got the 1000th like. Very helpful video!
@BytesNBits
@BytesNBits 7 місяців тому
Awesome! Thank you!
@CrackinWithARB
@CrackinWithARB Рік тому
This was an amazing video explaining the bluetooth receiver! I want to make a project where on my iPhone I can send the device an "on" or "off" signal and for the arduino to read if it is on or off (0/1) and turn a servo motor. The goal is to remotely turn on or off the lights in my room. Do you have any suggestions as to what bluetooth receiver I should use to connect to my phone and how I should go about this?
@BytesNBits
@BytesNBits Рік тому
Thanks for your comments. Have a look at this video - ukposts.info/have/v-deo/onegf5p9b6howqc.html. It should show you how to use these devices for the project.
@stu6097
@stu6097 8 місяців тому
Can you use a buck converter to reduce 5 volts coming from arduino down to the 3.3 instead of using resistance and dividing method you use?
@BytesNBits
@BytesNBits 8 місяців тому
Buck converters are more for a steady state voltage shift for power supply. The better solution to the resistor network is a level shifter IC. They are specifically designed for this function. A bi directional level shifter is what you're after. They come with multiple channels per IC.
@ebra9902
@ebra9902 10 місяців тому
You're a lifesaver
@BytesNBits
@BytesNBits 10 місяців тому
Glad to help.
@doverivermedia3937
@doverivermedia3937 Рік тому
Nice vids, glad I found you. I'm a bit confused. My project needs multiple receivers. It seems that HC-05 can transmit & receive ? As they seem identically priced in most places to HC-06, is there actually any need for HC-06s ? Also can multiple receivers operate simultaneously? Or is it restricted with 1:1 pairing of some kind.
@BytesNBits
@BytesNBits Рік тому
The HC-05 can act as a slave or a master so if you want your arduino to connect to other bluetooth arduinos you'll need the 05 module. Yes, you should be able to add more than one module to your arduino. Each needs a separate serial pin but they should work in parallel.
@wingggyintseee1797
@wingggyintseee1797 4 місяці тому
Thanks for the great video sir! Though I have a question about the code, for the pinMode(), why do you use rxPin instead of 9, as 9 was being set as a variable for rxPin on the top?
@BytesNBits
@BytesNBits 4 місяці тому
By creating a variable to hold the pin number you only have to edit the variable assignment (rxPin = 9) at the top of the listing to change the pin. If you use 9 in the code you need to find and edit each line. It's just good practice to assign these sorts of numbers to a variable.
@wingggyintseee1797
@wingggyintseee1797 4 місяці тому
@@BytesNBits Thanks a lot!!
@Djshjwj
@Djshjwj 5 місяців тому
Thank you that was so helpful! Where did you write the code exactly?
@BytesNBits
@BytesNBits 5 місяців тому
You'll find a link to the project page in the description. You can download the code from there.
@antoniodias2776
@antoniodias2776 8 місяців тому
Excelente.
@BytesNBits
@BytesNBits 8 місяців тому
Thanks
@iqbalbhaiyat5511
@iqbalbhaiyat5511 2 роки тому
Thx you
@BytesNBits
@BytesNBits 2 роки тому
No problem
@cyberdyers
@cyberdyers Рік тому
Voltage out for the resistor of 2.2 K and 5.7K is around 3.56 volts, i suggest replacing the 5.7K with 4.4k, since this value is hard to find, try 2 pcs of 2.2 K in series to get approx. 3.29 volts
@BytesNBits
@BytesNBits Рік тому
Thanks for the tip.
@OpenDeepLearning
@OpenDeepLearning 10 місяців тому
This lesson is so so good! Thank you! I am watching this because I want to connect my wired mouse to arduino and arduino to macbook air via bluetooth (basically I want to make my gaming mouse wireless - with bluetooth). I want to create this because the usb hubs found online are either too expensive or so crappy (and damage my macbook air battery). So, this bluetooth-arduino based bridge would fix my issues. What do you think about this?
@BytesNBits
@BytesNBits 10 місяців тому
I'd probably look at using an ESP32 for this project. The Bluetooth is much better integrated and will be a lot easier to get it to mimic a mouse. I made a video a while back that used the ESP32 to mimic a keyboard so the principle is basically the same.
@OpenDeepLearning
@OpenDeepLearning 9 місяців тому
@@BytesNBits Thank you very much!
@manfredbogner9799
@manfredbogner9799 12 днів тому
Very good
@BytesNBits
@BytesNBits 11 днів тому
Thanks
@ericwilson9494
@ericwilson9494 Рік тому
Trying to integrate my arduino and an application known as Processing 4 from my laptop to the board , any suggestion on which paticular one both sound tempting but cant decide.
@BytesNBits
@BytesNBits Рік тому
Hi. I've not tried the Processing system. If they can both do the job use the one that feels best for you, or try them both out!
@tomsheppard1666
@tomsheppard1666 8 місяців тому
Why are you not using the preferred resistor value?
@BytesNBits
@BytesNBits 8 місяців тому
The resistor values I used where the ones I had in my toolbox. As long as you get about the right ratio they will be fine. A better solution is to use a level shifter IC.
@hfk2609
@hfk2609 8 місяців тому
Do you have any code with Arduino and HC-05 that can control a 12V fan, I really need it for my project, plz help me out
@BytesNBits
@BytesNBits 8 місяців тому
You'll need to modify the code in the tutorial. This allows you to send messages from your phone to your Arduino. You need to get the arduiono to decode the message to turn the fan on and off.
@kenmiles32
@kenmiles32 6 місяців тому
Hey @BytesNBits when I did what you did, the Bluetooth Terminal got connected but when I try to send a msg with a semicolon it is not printed in the serial monitor nor i am getting the return print in the terminal back again. I checked the code and the wiring everything seems to be perfect.Both the Baud Rates are also set at 9600. Is there anything else I can do to trouble shoot?
@BytesNBits
@BytesNBits 6 місяців тому
Hi. Does the Arduino recognise the connection at its end? Try to put in some serial print statements to help you trace what the Arduino thinks is happening. If that all looks fine code the Arduino to just send a character every couple of seconds to see if that gets through. I hope this helps.
@kenmiles32
@kenmiles32 6 місяців тому
@@BytesNBits First off, thanks for replying. Yes I did that by using if (BTSerial.available() ){ } but then it returned zero implying nothing is reaching the arduino (nothing in the buffer). I thought it must be the problem with the BT Terminal app but there seems to be nothing that looks off the track. I then tried to see if it is problem in the BT module itself but then it blinks and statically stays when connected. Then the only thing I can think of is that there is some miscommunication with the Ports (COM7 COM3 anol). The SSOBL(Standard Serial Over Bluetooth Link) ports have some interference whenever I use the Arduino IDE software (version 2.2.1) How I do go about troubleshooting the ports? Do I need to see on some other laptop?
@krabbypatty6381
@krabbypatty6381 4 місяці тому
Hi, i would like to ask about the bluetooth module, once a mobile has been paired to a bluetooth module, is there any way for the user to retrieve the setup’s indoor location, is it even possible to track the setup of NodeMCU esp8266 by depending on the bluetooth module? since neo6m gps modules doesnt really work indoors
@BytesNBits
@BytesNBits 4 місяці тому
I'm not really sure what you mean. The Bluetooth module doesn't provide any real location data. You could try to pull this from the mobile device or your GPS module and then transmit the location data over Bluetooth.
@darthdaenerys
@darthdaenerys 2 роки тому
I recently purchased a hc 05. When I power the Bluetooth, sometimes it blinks and sometimes it doesn't. The same is with the connection. Also, when I transmit any data from the mobile application, the Bluetooth doesn't send it to Arduino. Should I ask for replacement
@BytesNBits
@BytesNBits 2 роки тому
Hi. Make sure the device isn't pairing with your phone when you turn it on. If it is the led might not blink - I think blinking means its in pairing mode, solid means it has paired.
@amsndd6379
@amsndd6379 3 місяці тому
sir i do want to turn on and off led with pic16f877A and bluetooth HC06 module .but the blink is not stopping in the n=bluetooth module
@BytesNBits
@BytesNBits 3 місяці тому
Can your phone/pc see the bluetooth module to pair with it?
@Anton-le7gd
@Anton-le7gd Рік тому
Do you need to pair the module with your phone every time you use it or only the first time?
@BytesNBits
@BytesNBits Рік тому
One paired it should appear in your phone device list.
@user-in8qf8vv6e
@user-in8qf8vv6e Місяць тому
Do you know how to adjust this code so that it will work with an arduino nano on pins D4 and D5? I tried changing: const byte rxPin = 9; const byte txPin = 8; to const byte rxPin = 5; const byte txPin = 4; but the arduino nano is not receiving my commands from my HC-05
@BytesNBits
@BytesNBits Місяць тому
The SoftwareSerial library should let you use any two pins you want. Did you have it working before?
@andrewshepherd7429
@andrewshepherd7429 Рік тому
It's frustrating reading all of these successful efforts. It all looks so well explained, but, while my phone sees the HC-06 module, I can't get my phone to connect to the HC-06. I purchased two HC-06 modules. When trying to make a connection using 'serial bluetooth terminal', one of my modules consistently returns the message "Connection failed: write characteristic not writeable", the other one consistently returns a message "Connection failed: gatt status 133". Can anyone suggest solutions?
@BytesNBits
@BytesNBits Рік тому
Hi. That's a bummer having both giving errors. Does your phone manage to pair with the devices? Have you tried using a PC or another device to connect? I haven't seen these errors before.
@andrewshepherd7429
@andrewshepherd7429 Рік тому
@@BytesNBits Thanks for replying so quickly. Yes the bluetooth on my phone does seem to connect with both, but then the error occurs when I try to pair with 'Serial Bluetooth Terminal'. Perhaps I should try the other bluetooth apps. I have tried several times, identifying which is which with a pencil mark, then disconnecting, deleting the pairing and then trying again. The result is the same every time with the same error always on the same module. These are errors that pop up on internet searches, but so far I haven't been able to sort a solution. Does it sound to you like the modules themselves may be faulty?
@andrewshepherd7429
@andrewshepherd7429 Рік тому
@@BytesNBits It's sorted. I am a fool. I went back into serial bluetooth terminal and hunted around. Then I noticed it was using Bluetooth LE, rather than Bluetooth Classic. When I changed this, both modules connected immediately. Now I am able to press on. Sorry to have wasted your time.
@BytesNBits
@BytesNBits Рік тому
@@andrewshepherd7429 I think you'd be very unlucky to get two faulty modules. I would try another app on the phone, or if you have access to another phone / tablet etc. Just to confirm that its the connection failing and not some other incompatibility.
@EchoPrograms
@EchoPrograms 2 роки тому
this works, except the receiving on the app for "laser off;" is "Ylaser on;", "Y laser on;", "Y;", and a few other mashups. Why does it do this?
@BytesNBits
@BytesNBits 2 роки тому
Hi. I'm not sure why you're getting the extra Y and other characters on the messages. Check your code to make sure you've removed any test sending etc. If you can't get rid of the bad characters try wrapping the real message in start and stop characters e.g. *laser on ;, you can then ignore anything before the * and after the ;
@certifiedlostincommentsect9565
@certifiedlostincommentsect9565 Місяць тому
Good day sir Is it possible to make bluetooth gps tracker with bluetooth module and neo 6m gps module? Thank you in advance
@BytesNBits
@BytesNBits Місяць тому
I think that would be a great project. Make sure you check the interfaces first and understand how to drive them. Have a look for some ready made driver libraries. Good luck!
@certifiedlostincommentsect9565
@certifiedlostincommentsect9565 Місяць тому
@@BytesNBits supposedly it was gonna be gsm900a module in which we will send the msg through sms in order to gain information of the gps tracker but we didn't know that gsm900a module only works 2g, 3g signals only. While i was brainstorming for ideas i remember that there was another way to communicate the device and the arduino and it was bluetooth. Since im a grade 12 student i hope this idea works since this is the only option left unless you recommend me some alternate ideas to make gps tracker.
@e.t1224
@e.t1224 11 місяців тому
Do you have a project-like document write up for this ?
@BytesNBits
@BytesNBits 11 місяців тому
Yes. Link in the description - bytesnbits.co.uk/adding-bluetooth-to-your-arduino-projects/
@davedc6847
@davedc6847 7 місяців тому
Please tell me... how are you achieving Arduino simulation? All I get is "NO SPICE INFORMATION".
@BytesNBits
@BytesNBits 7 місяців тому
Which part of the video are you stuck on?
@davedc6847
@davedc6847 7 місяців тому
Sorry, your video is great! I mixed your video up with many others I've been watching. I was hoping to simulate some bluetooth circuits before buying the parts. I've been watching many videos on simulating Arduino circuits and was frustrated that Fritzing doesn't seem to have that ability (TinkerCad does, but no HC-05/6 parts). Looks like Fritzing is more of a circuit drawing program than a simulator. Thanks for the reply! @@BytesNBits
@kapoioskapoiou8631
@kapoioskapoiou8631 Рік тому
Thank you for the video I just subscribed. I have a question when you first run it on Arduino and if i type on my phone's terminal "green;" I get a result: You typed green Now if type after another word or the same there is a gap after the "You typed" I get a result You typed green And that's a problem for me since i have added a red led and a green led . When the program runs for the first time it's ok , writing for example in the phone's terminal "red;" or "green;" it lights up the desired led but if I write again "red;" or "green;" the program doesn't recognize the word ( I suppose that's because for a reason i don't know if you type for a second time it's like the word has the enter in front it??maby?) . How can I resolve this issue?
@BytesNBits
@BytesNBits Рік тому
Try putting a print message line in just before the if statement to make sure the code is getting the right message. How did you turn the led off. Check that that coffee is not getting in the way.
@kapoioskapoiou8631
@kapoioskapoiou8631 Рік тому
@@BytesNBits Thanx a lot for your reply. I edited again my question. I wanted to be brief. i have two LEDs connected to 2 digitalOut pins and if it finds the word "green;" it makes a digitalWrite HIGH to greenLed and a digitalWrite LOW to redLed. The desired LED lights only for the first time a word is given for example "green;" but if I give after the word "red;" it doesn't recognize the word So the green LED stays on forever till i restart the circuit.
@BytesNBits
@BytesNBits Рік тому
@@kapoioskapoiou8631 In your print statement try printing out the length of the string it receives, This should tell you if other characters are getting into the input. You might then have to clean the input or simply search for red / green instead of using the == operator.
@kapoioskapoiou8631
@kapoioskapoiou8631 Рік тому
@@BytesNBits I will look into it but I thought since you were having this problem in 21:27, your first result is "You printed word" ...but on your second result is: "You printed One Two Three" The "You printed" is not in the same line with the word. Thank you anyway, you are amazing, I will solve that issue in the end. I spent lot of hours watching only 2 of your videos, taking some notes while i was watching. You are my teacher now 🙂
@BytesNBits
@BytesNBits Рік тому
@@kapoioskapoiou8631 You're right. There are definitely some end of line characters getting through on my tests. A good practice to get into is to clean any data coming through - strip whitespace from the start , etc. Then test the string contains the values you're looking for and that they are in the right positions rather than a straight equivalence check.
@IamLaggin
@IamLaggin 12 днів тому
Is it possible to use speech using this system on the phone to trigger the Bluetooth module
@BytesNBits
@BytesNBits 11 днів тому
You'd be pushing the limits of the Arduino Uno to do any sort of speech recognition. But you could hook up a microphone and simply get it to respond to any loud noise, e.g. a clap or something.
@IamLaggin
@IamLaggin 10 днів тому
@@BytesNBits I see thank you for the advice
@e.t1224
@e.t1224 10 місяців тому
Good day Please I want to create a simulation for bluetooth controlled fan regulator using proteus I haven’t seen anything close to that online
@BytesNBits
@BytesNBits 10 місяців тому
Sorry. I haven't used Proteus so can't help you on this one.
@mohamed_abdelkhalek
@mohamed_abdelkhalek 5 місяців тому
sir, what is name of program you used to design curcuit in 5:45
@BytesNBits
@BytesNBits 5 місяців тому
fritzing.org/ Have fun!
@tinglin6121
@tinglin6121 Рік тому
Since I am using an iPhone, I am using other apps that say to support BLE to send the messages. However, it seems like the "pairing" never happens; it just connects straight to the module on the arduino (indicated by the LED stops blinking). Then, when I send any signal from the app, nothing on the arduino serial monitor ever shows up. Is this a common problem? Thanks in advance.
@BytesNBits
@BytesNBits Рік тому
Does the iPhone show that it is connected to the device? There should be a list of active Bluetooth devices in your settings or somewhere. If it's connected get the Arduino to report if it thinks it's connected as well. If both are connected you might need to try a different terminal app. I hope this helps.
@Claykiez
@Claykiez Рік тому
how do i connect it with a shield groove i looked everywhere but nobody is talking about it
@BytesNBits
@BytesNBits Рік тому
Sorry, but I've not used that setup. I'm assuming the shield lets you connect to the Arduino pins in some way. If that's the case once you've got that worked out it should be the same as in the video.
@sirgen001
@sirgen001 2 роки тому
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.
@BytesNBits
@BytesNBits 2 роки тому
Hi. I haven't yet looked at accessing the phone messaging system through the app creator. I'll add it to the possible video list.
@coconutph8842
@coconutph8842 4 місяці тому
what if you accidentally wired 5 volts to the ground of your hc05? will it short circuit?
@BytesNBits
@BytesNBits 4 місяці тому
I'm not sure what protection the module has but I suspect not much. Nothing good will come of this!!
@MrSupcioKox
@MrSupcioKox Місяць тому
hi,my hc-06 responding for AT commands, but when i got to this video i did everything just like you (copied the code) and my hc-06 is connecting with my phone via serial bluetooth terminal and it says connected but when i type message i dont get answer. Im strugling over a week now and i dont know what is wrong. First i had problem with even answering to AT commands but i manage and now it is not responding back for instance for "hello;" :(
@BytesNBits
@BytesNBits Місяць тому
try adding some debugging serial print lines to see what's happening in the code. If the two devices are pairing you should be getting some communication.
@MrSupcioKox
@MrSupcioKox 16 днів тому
@@BytesNBits hello, im still struggling over this, i dont get what is wrong. I connect to phone and the led on the module is stop blinking, i try to messsage but no asnwer. I tried some serial print lines, but it seems to be that the BT.available is not getting anything thus BT.read cannot be executed. It looks like it is paired and connected and everything, but when i send something this not reading it at all.
@hann3s_220
@hann3s_220 16 днів тому
​@@MrSupcioKoxhi, i have the Same problem here, I csn't even print a line:(
@MrSupcioKox
@MrSupcioKox 16 днів тому
@@hann3s_220 i get communication when im in AT mode (when i type AT i got OK in answer), but when im connecting hc-06 to a phone or even i try with terminal apps on computer or serial monitor within the arduine IDE, and all that tries were the same - i dont get communication at all. I even bought the second hc-06 it is acting the same.
@domseschummsi5476
@domseschummsi5476 5 місяців тому
Hello sir, i followed your video step by step but somehow i wasnt able to pair with the module as it simply didnt show up in the „avaliable devices“ section. Does this not work for slave modules? And if it doesnt, how would one talk to a slave module?
@BytesNBits
@BytesNBits 5 місяців тому
This should be fine for the slave modules. Do you get any LED output to show the device is in pairing mode when you power it on? Have you tried using another phone or tablet to see if that picks up the signal?
@domseschummsi5476
@domseschummsi5476 5 місяців тому
@@BytesNBitsthe LED was on but it still dind‘t show up. Well and I‘m afraid this doesn‘t matter anymore as ive just accidentaly fried all of my components because i forgot to adjust the voltage on my powersource after ussing it for something else, thanks for your help tho!
@a.hanshgaming1529
@a.hanshgaming1529 Рік тому
I am using HC 06 module but after connection with ardino uno led in Bluetooth module is not blinking. Please help to solve this problem.
@BytesNBits
@BytesNBits Рік тому
Hi. Have you checked all the connections to the module? Is it getting power? The HC06 should go straight into pairing mode. Do you have a spare to test?
@a.hanshgaming1529
@a.hanshgaming1529 Рік тому
@@BytesNBits Thanks to reply Module HC06 which i used is faulty it is not getting power . Now i am using another one i.e. HC05 and it is working fine .
@matteoramanzini1842
@matteoramanzini1842 3 місяці тому
what arethe value of the 2 resistor?
@BytesNBits
@BytesNBits 3 місяці тому
I used a 2K2 and 5K7
@SebastianGonzalez-br7qb
@SebastianGonzalez-br7qb 5 днів тому
I am able to get the messages from terminal to my computer, but i can not send from my computer to terminal. I got it to work before, but when I tried redoing it, I can not get it to work. Please any tips????
@BytesNBits
@BytesNBits 5 днів тому
If it was working before something has got mixed up in the setup. I'd try unpairing and forgetting the connection and uninstalling at the computer end and reinstalling to try to clear out the settings.
@lijinv674
@lijinv674 2 місяці тому
can i send message from serial monitor to terminal
@BytesNBits
@BytesNBits 2 місяці тому
Yes. But you'll need to write some code to collect the input from the serial monitor and feed that to the terminal app.
@MrThoymen
@MrThoymen 11 місяців тому
Why can't you just plug the TXD and the RXD into the TX and the RX on your arduino aka Digital pin 1 and 2?
@BytesNBits
@BytesNBits 11 місяців тому
The arduino works on 5V logic wheras the BT module works on 3.3V. The output from the Arduino needs to be brought down to the correct voltage to avoid damage to the HC06. In reality you can probably get away with the voltage difference as the Arduino can't drive enough current, but in my videos I prefer to take the safe route just in case it causes damage to the BT module.
@ShitBrick785
@ShitBrick785 Рік тому
I think the calculations of the resistors is off. I = V/Rt = 5/(2200+5700) = 0.0006329114 * 2200 = 1.39Vd when it should be close to 3.3 correct?
@BytesNBits
@BytesNBits Рік тому
We're tapping of the voltage across the 5k7 which gives about 3.7v
@ShitBrick785
@ShitBrick785 Рік тому
​@@BytesNBits ah yes I'm an idiot. Didn't pay close attention to the wires 😊
@fernandohood5542
@fernandohood5542 Рік тому
These libraries hide to much information. Is the bluetooth module in master of slave?
@BytesNBits
@BytesNBits Рік тому
Hi. In this tutorial the Arduino with HC-06 is a slave. the HC-06 only allows a slave connection so you will need a master device to connect to it before any communication can occur. If you want to get two arduinos talking you'll need at least one with an HC-05 module running as a master. This will initiate the connection.
@PotatoImaginator
@PotatoImaginator 3 роки тому
Could you make a pinball game ? I Love Pinball Games :)
@BytesNBits
@BytesNBits 3 роки тому
Hi. This could be one for you to code. Start with a basic version and gradually expand it up to a full pinball table. Have a go!
@PotatoImaginator
@PotatoImaginator 3 роки тому
@@BytesNBits I'll try :) I was thinking of adding BreakOut / Pong Pad at bottom instead of pinball hitting thingys :)
@BytesNBits
@BytesNBits 3 роки тому
I made a breakout clone in an Arduino video if that's any help. ukposts.info/have/v-deo/h5hqqp2mpK-msH0.html
@PotatoImaginator
@PotatoImaginator 3 роки тому
@@BytesNBits Sure, thanks :)
@aaravkhaitan712
@aaravkhaitan712 2 місяці тому
I received an error while uploading the code to my arduino
@aaravkhaitan712
@aaravkhaitan712 2 місяці тому
Arduino: 1.8.15 (Windows 10), Board: "Arduino Uno" sketch_nov21a:4:21: error: expected ',' or ';' before ':' token const byte rxPin = 9: ^
@BytesNBits
@BytesNBits 2 місяці тому
I think the full colon at the end of the line should be a semi colon.
@aaravkhaitan712
@aaravkhaitan712 2 місяці тому
In function 'void setup()': sketch_nov21a:14:3: error: expected ';' before user-defined character literal ','Serial.begin(9600); ^~~~~~~~~ : In function 'void loop()': sketch_nov21a:20:11: error: 'BTSerial' was not declared in this scope while (BTSerial.available()>0) ^~~~~~~~ :20:11: note: suggested alternative: 'Serial' while (BTSerial.available()>0) ^~~~~~~~ Serial sketch_nov21a:22:21: error: 'data' was not declared in this scope messagebuffer += data; ^~~~ : note: suggested alternative: 'atan' messagebuffer += data; ^~~~ atan exit status 1 expected ';' before user-defined character literal
@aaravkhaitan712
@aaravkhaitan712 2 місяці тому
more error codes 😔
@aaravkhaitan712
@aaravkhaitan712 2 місяці тому
to fix it all I put int data at the first but in the app the reply im getting is ^@ again and again
@NAWAWINSAVIYYA
@NAWAWINSAVIYYA 3 місяці тому
Canyou send the code
@BytesNBits
@BytesNBits 3 місяці тому
Check out the project page - link in the video description
@nerdshtenterprises2295
@nerdshtenterprises2295 Рік тому
I see many Videos abaut konekting flaching .. ... .....🤤🥶🥴 Not my I need a Chip Module with software like victron and other chargecontrollers konnekt a little power station with my Phone
@BytesNBits
@BytesNBits Рік тому
I'm not sure what you're after but the bluetooth module will let you control your arduino from your phone.
Using AT Commands to Set Up Your Bluetooth Module : HC-05 and HC-06
14:39
HC-05 Bluetooth Module with Arduino-MIT App Inventor
27:57
BINARYUPDATES
Переглядів 937 тис.
Лизка заплакала смотря видео котиков🙀😭
00:33
Китайка и Мармеладный Лего😂😆
00:19
KITAYSKAYA ZMEYKA
Переглядів 2,3 млн
Arduino To ESP32: How to Get Started!
9:26
Robonyx
Переглядів 127 тис.
Arduino HC-05: Bluetooth Smart Home Lighting Simulation w/UNO, LEDs, mBlock 5 + Android [Tutorial]
33:28
Arduino Bluetooth AT commands HC 05 HC 06
7:20
DIY GUY Chris
Переглядів 56 тис.
🖥️Играю в Cyberpunk на Ардуино!
18:22
AlexGyver
Переглядів 1,2 млн
Bluetooth 2.0 VS Bluetooth 4.0 (BLE) || Is an Upgrade worth it?
7:54
GreatScott!
Переглядів 595 тис.
Wireless Arduino - Python HC-05 Bluetooth on PC
10:43
ExplorationSci
Переглядів 11 тис.
Arduino HC-05: Bluetooth Module Configurator w/UNO R3 & Basic AT Commands [Tutorial]
13:04
Paul Marriott - CHANNEL of STUFF
Переглядів 43 тис.