arduino bluetooth module
., I hope you are doing good and this is Jay again from MechStuff. Today we are going to see how to control a LED with the help of a bluetooth module and an Android. So you are going to only need a handful of things.. Like.., an Arduino board and LED a Bluetooth module, a breadboard and a couple of jumpers So let’s take our first component… This is our Bluetooth model, HC 05 and, as you can see.., it has got 6 pins out of which we are not going to use the first and the last pin So let’s just focus on the other 4 pins between them. The 2nd and the 3rd pin VCC amp GND, as always goes to the VCC amp GND of the Arduino board, and the TXD amp RXD pin goes to pin number 0 and 1 of the Arduino board, which is at the lowest point of 13 digital pins. Over here So let’s start connecting… I just mounted the bluetooth module.., As mentioned earlier, no connection to pin number 1 so pin. Number 2 goes to VCC Now, pin number 3 Just a second … Pin 3 goes to GND. Well, just don’t connect the pin number 4 and 5 for now.. Let’s connect our LED as well …. The positive terminal goes to any of the 13 digital pins over here.. I’ll go for, pin 8 And negative terminal goes to GND, So connections are done.. and we’ll. Discuss about the RXD and the TXD pin later Now, let’s move to our coding part.
As before, in the void setup, we will declare pin 8 as output, pin, which is connected to ve terminal of the LED Then coming to our looping part. So if the Arduino receives any data, if Serial.available gt 0, then Serial.read means read the data, Then coming to our Switch statement. If the data received is quotaquot which comes under the Case ‘a’, then the LED will glow.., which means the terminal 8 will be HIGH, and if it is case ‘d’, then the terminal will be low and the LED will turn off. As simple as that Then coming To our break statement.. After the switch statement Serial.printlndata, which means that the received data would be printed in the serial monitor here in the top right corner of your window and then repeat this whole procedure after every 50 microseconds, so that it would receive the data. After every 50 microseconds., So that’s it.. 20 lines of code and you could control things with the help of your smart phone, So let’s just move further.. Let’s take our smart phone.. and you download an app called as BluControl from the Google Play Store. Well, the link for download is available in the description, Just go and download this Blucontrol app, and then we will connect it to our bluetooth sensor. Just open the app amp. The app itself would ask you whether to turn on the Bluetooth. I will grant the access.. Then go to options, select Connect, gt Scan for the devices You’ll see here, bluetooth sensor, HC 05 is visible over here.
Let’S connect it… It will ask you a password… It has already given as the hint that the password would be usually 0000 or 1234. Try both of them.. Well, I know the password, so I am trying 1234. It says connected to HC 05, which means that our Bluetooth module is successfully paired with our device.. You can check whether the device has been successfully paired with the Bluetooth module by just looking at the blinking LED on the Bluetooth sensor. If the sensor is blinking at a slower rate than before connecting This means, the Bluetooth module has been successfully connected. So let’s come back to our Android and according to our code, when I press quotaquot, the LED will be ON and when I press quotdquot, the LED will be OFF So lets check it out… When I press quotaquot, the LED is ON When I press quotDquot, the LED is OFF a ON d OFF. You see. How easy is that So that’s all for today, guys.. Just remember: YOU NEED TO CONNECT THE RXD amp TXD, PIN AFTER UPLOADING THE CODE, Or else it will give you errors and the code will not get uploaded. Just take care of that one thing.. So in my next video we are going to see how to control an LED with the help of VOICE COMMANDS. Stay TUNED SUBSCRIBE TO MY CHANNEL amp get notified about my further videos.
arduino bluetooth module Video
arduino bluetooth module news
Posted on Sunday September 29, 2019Pie Face Game Rigged To Throw Pie At Anyone But You Hackaday … Continue Reading »
Posted on Friday October 04, 2019Wio Lite RISC-V WiFi Board with ESP8266 Module Launches for $6.9 CNX Software … Continue Reading »
Posted on Thursday September 19, 2019Spartan Edge Accelerator Arduino Compatible Board Combines ESP32 & Spartan-7 FPGA CNX Software … Continue Reading »
arduino bluetooth module Social
🔬 Now that you’ve gotten your feet wet, dive into the kit and enjoy all nine experiments. Order yours today: http://bit.ly/2MnQ7fr
Originally posted 2016-05-17 21:25:39.