**Using Bluetooth with Arduino: A Beginner's Guide**
Bluetooth is a great way to transfer data or control gadgets with a smartphone, and even Sheldon Cooper says so. Everything is better with Bluetooth, this little device here with only four pins connects super simple to your Arduino projects and lets you control all sorts of things.
For example, I built a little controller which I use to control different LEDs in my living room to light up, change the brightness or go through different animations. And I have to say that it looks freaking awesome! So, I'm going to show you an easy way to use this little piece of hardware.
**Where to Buy Bluetooth Modules**
First things first, where to buy one of those? You can get them inexpensively from Amazon or Ebay. I put a link in the description, but I have to say that those things are fragile objects. The first one I got from China simply was broken from the beginning, but Chinese people are very friendly, so they sent me a new one.
The second one I blew up while connecting to the Arduino. But no worries, I'm using an ultra nano today, yeah, it's pretty fancy. It uses the same microcontroller as the Arduino Uno and tests basically the same features, but it's pretty small, so perfectly for small projects.
**Connecting Bluetooth Modules**
Those modules will operate on 5-volt supply voltage, that's not the problem. But in comparison to the Arduino, which uses fivefold logic levels, this Bluetooth module uses 3.3 voltage levels. That means when you connect the transmit pin from the module to the receive pin of the Arduino, the Arduino will receive 3.3 voltage levels, which is totally fine with the Arduino because it's compatible.
But when the Arduino wants to talk to the module through the wire which is connected to the transmit pin of the Arduino and the receive pin of the module, there is a problem. At first, it worked perfectly fine, but then I send a lot of 5-volt data to the module, and it just stopped working.
So, we got to use a voltage divider to convert our 5-volt signal to a 3.3 volt signal. All you need are two resistors which are already calculated for you: 1/2 kilo ohm resistor and a 4.7 kilo ohm resistor. We get around 3.4 volts in the middle, which would work fine with the module.
Just connect TX of your 3 node to the 2k resistor and ground to the 4.7 kilo ohm resistor. The RX pin of your module goes in the middle of the resistors.
**Wiring RGB LED**
Let's get to the wiring. I use this common anode RGB LED, which has obviously one anode and three cathodes. The three cathodes each get a resistor of around 460 ohms and connect to the Arduino nano digital pin 8, 9, and 10.
And I already told you how to connect the module to the Arduino through the RX and TX pins.
**Using Android App**
To use an Android app, I really like using S2 Terminal because it's simple, and the ASCII conversion works really nice. So, I put a link in the description, and it's free by the way or just search S2 Terminal in the Play Store.
The Arduino code looks complicated at first, and I have to say that I did this one on my own, and I'm surprised that it works so well. You can just use my code and change the code word right here in my case. The words are red, green, and blue, and one line under there is written what will happen.
Just rewrite those two things, and you can turn on and off all kinds of cool things. Now it's time to upload, but always remember to cut the TX and RX connections to the module when you upload the code; it interferes with one another and will not work afterwards.
Reconnect those, and pair your Bluetooth module. My one is named HC-05, the pairing code is usually 1 2 3 4 or 0 0 0 0 or in my case, not existing because I already did that.
The LED now turns red, green, or blue depending on which code word you sent, and it even responds with ASCII text saying that read on. For example, you find the answer text here in the code.
I hope you enjoyed this video! Don't forget to like, share, subscribe, stay creative, and I will see you next time!