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

  Рет қаралды 112,507

Bytes N Bits

3 жыл бұрын

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-bluetooth-to-your-arduino-projects/
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

Пікірлер: 149
@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 7 ай бұрын
great tutorial that goes in depth to explain; needs stuffs like that teaches under the hood mechanisms. Thank you for content
@BytesNBits
@BytesNBits 7 ай бұрын
Glad it was helpful!
@danger0679
@danger0679 Жыл бұрын
Video provided great help for our project. Thanks
@BytesNBits
@BytesNBits Жыл бұрын
Glad it helped
@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
@Brandon-qp7gq
@Brandon-qp7gq 10 ай бұрын
Great tutorial, thank you!
@BytesNBits
@BytesNBits 10 ай бұрын
You're very welcome!
@winna101ify
@winna101ify Жыл бұрын
Very well explained video, thank you.
@BytesNBits
@BytesNBits Жыл бұрын
No problem.
@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!
@BenParisi
@BenParisi 10 ай бұрын
absolutely perfect. Thanks so much!
@BytesNBits
@BytesNBits 10 ай бұрын
You're very welcome!
@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 9 ай бұрын
I got the 1000th like. Very helpful video!
@BytesNBits
@BytesNBits 9 ай бұрын
Awesome! Thank you!
@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.
@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 - kzbin.info/www/bejne/oHjSfJd8bddql9U. It should show you how to use these devices for the project.
@ebra9902
@ebra9902 Жыл бұрын
You're a lifesaver
@BytesNBits
@BytesNBits Жыл бұрын
Glad to help.
@stu6097
@stu6097 10 ай бұрын
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 10 ай бұрын
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.
@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!
@iqbalbhaiyat5511
@iqbalbhaiyat5511 2 жыл бұрын
Thx you
@BytesNBits
@BytesNBits 2 жыл бұрын
No problem
@wingggyintseee1797
@wingggyintseee1797 6 ай бұрын
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 6 ай бұрын
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 6 ай бұрын
@@BytesNBits Thanks a lot!!
@Djshjwj
@Djshjwj 8 ай бұрын
Thank you that was so helpful! Where did you write the code exactly?
@BytesNBits
@BytesNBits 8 ай бұрын
You'll find a link to the project page in the description. You can download the code from there.
@manfredbogner9799
@manfredbogner9799 2 ай бұрын
Very good
@BytesNBits
@BytesNBits 2 ай бұрын
Thanks
@krabbypatty6381
@krabbypatty6381 6 ай бұрын
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 6 ай бұрын
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.
@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.
@OpenDeepLearning
@OpenDeepLearning Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@BytesNBits Thank you very much!
@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.
@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.
@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.
@kenmiles32
@kenmiles32 8 ай бұрын
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 8 ай бұрын
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 8 ай бұрын
@@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?
@amsndd6379
@amsndd6379 5 ай бұрын
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 5 ай бұрын
Can your phone/pc see the bluetooth module to pair with it?
@e.t1224
@e.t1224 Жыл бұрын
Do you have a project-like document write up for this ?
@BytesNBits
@BytesNBits Жыл бұрын
Yes. Link in the description - bytesnbits.co.uk/adding-bluetooth-to-your-arduino-projects/
@antoniodias2776
@antoniodias2776 11 ай бұрын
Excelente.
@BytesNBits
@BytesNBits 11 ай бұрын
Thanks
@mohamed_abdelkhalek
@mohamed_abdelkhalek 7 ай бұрын
sir, what is name of program you used to design curcuit in 5:45
@BytesNBits
@BytesNBits 7 ай бұрын
fritzing.org/ Have fun!
@TheOldKid
@TheOldKid Ай бұрын
My mother was throwing out a smart tv die to bad pic. I took it to see what comps I could repurpose. One was wifi/bt but seems that's a bigger job than I thought. I like to repurpose but those chips seem more involved😊
@BytesNBits
@BytesNBits Ай бұрын
You'll need to find the datasheets for the devices and then work out how to interface them to some other processor. Not impossible, but a big project.
@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 ;
@hfk2609
@hfk2609 11 ай бұрын
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 10 ай бұрын
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.
@e.t1224
@e.t1224 Жыл бұрын
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 Жыл бұрын
Sorry. I haven't used Proteus so can't help you on this one.
@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.
@user-in8qf8vv6e
@user-in8qf8vv6e 4 ай бұрын
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 4 ай бұрын
The SoftwareSerial library should let you use any two pins you want. Did you have it working before?
@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.
@coconutph8842
@coconutph8842 7 ай бұрын
what if you accidentally wired 5 volts to the ground of your hc05? will it short circuit?
@BytesNBits
@BytesNBits 7 ай бұрын
I'm not sure what protection the module has but I suspect not much. Nothing good will come of this!!
@tomsheppard1666
@tomsheppard1666 10 ай бұрын
Why are you not using the preferred resistor value?
@BytesNBits
@BytesNBits 10 ай бұрын
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.
@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.
@IamLaggin
@IamLaggin 2 ай бұрын
Is it possible to use speech using this system on the phone to trigger the Bluetooth module
@BytesNBits
@BytesNBits 2 ай бұрын
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 2 ай бұрын
@@BytesNBits I see thank you for the advice
@matteoramanzini1842
@matteoramanzini1842 5 ай бұрын
what arethe value of the 2 resistor?
@BytesNBits
@BytesNBits 5 ай бұрын
I used a 2K2 and 5K7
@certifiedlostincommentsect9565
@certifiedlostincommentsect9565 3 ай бұрын
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 3 ай бұрын
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 3 ай бұрын
@@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.
@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.
@domseschummsi5476
@domseschummsi5476 7 ай бұрын
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 7 ай бұрын
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 7 ай бұрын
@@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 .
@lijinv674
@lijinv674 4 ай бұрын
can i send message from serial monitor to terminal
@BytesNBits
@BytesNBits 4 ай бұрын
Yes. But you'll need to write some code to collect the input from the serial monitor and feed that to the terminal app.
@SebastianGonzalez-br7qb
@SebastianGonzalez-br7qb 2 ай бұрын
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 2 ай бұрын
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.
@MrThoymen
@MrThoymen Жыл бұрын
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 Жыл бұрын
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 😊
@MrSupcioKox
@MrSupcioKox 3 ай бұрын
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 3 ай бұрын
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 2 ай бұрын
@@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 2 ай бұрын
​@@MrSupcioKoxhi, i have the Same problem here, I csn't even print a line:(
@MrSupcioKox
@MrSupcioKox 2 ай бұрын
@@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.
@davedc6847
@davedc6847 10 ай бұрын
Please tell me... how are you achieving Arduino simulation? All I get is "NO SPICE INFORMATION".
@BytesNBits
@BytesNBits 10 ай бұрын
Which part of the video are you stuck on?
@davedc6847
@davedc6847 10 ай бұрын
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
@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.
@NAWAWINSAVIYYA
@NAWAWINSAVIYYA 5 ай бұрын
Canyou send the code
@BytesNBits
@BytesNBits 5 ай бұрын
Check out the project page - link in the video description
@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. kzbin.info/www/bejne/hZmcp5qlot6ohas
@PotatoImaginator
@PotatoImaginator 3 жыл бұрын
@@BytesNBits Sure, thanks :)
@aaravkhaitan712
@aaravkhaitan712 4 ай бұрын
I received an error while uploading the code to my arduino
@aaravkhaitan712
@aaravkhaitan712 4 ай бұрын
Arduino: 1.8.15 (Windows 10), Board: "Arduino Uno" sketch_nov21a:4:21: error: expected ',' or ';' before ':' token const byte rxPin = 9: ^
@BytesNBits
@BytesNBits 4 ай бұрын
I think the full colon at the end of the line should be a semi colon.
@aaravkhaitan712
@aaravkhaitan712 4 ай бұрын
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 4 ай бұрын
more error codes 😔
@aaravkhaitan712
@aaravkhaitan712 4 ай бұрын
to fix it all I put int data at the first but in the app the reply im getting is ^@ again and again
@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.
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 14 МЛН
I wish I could change THIS fast! 🤣
00:33
America's Got Talent
Рет қаралды 105 МЛН
I CAN’T BELIEVE I LOST 😱
00:46
Topper Guild
Рет қаралды 94 МЛН
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 14 МЛН