• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Arduino Bluetooth Remote Control Tutorial : Part I

By Abhishek Ghosh December 2, 2018 11:12 pm Updated on December 2, 2018

Arduino Bluetooth Remote Control Tutorial : Part I

Advertisement

Previously, we discussed how to use Wi-Fi module with Arduino and Arduino 4 channel relay. Making them working togather with smartphone not that easy. Bluetooth is Easier Than Wi-Fi From Programming Aspect To Build Wireless Electrical Switch. Here is Part I of The Arduino Bluetooth Remote Control Tutorial.

There are various bluetooth modules for Arduino including modules supporting BLE. A bluetooth module operates at 2.4GHz short-range radio frequency band. Bluetooth has a range around 30 meters. A commonly used module is HC 05 bluetooth module. HM-10 Bluetooth module supports BLE. The required Android App for the M-10 Bluetooth module is available on Google Play :



https://play.google.com/store/apps/details?id=appinventor.ai_Esdrastlc.BLE_ControPanell&hl=en_US


There is another application named BLE Scanner. Both of them are useful in testing and development.

Advertisement

---

Android 8.0 will not find some HM-10 clone BLE modules when scanning for them out of a a bug in the firmware of those modules. The HM-10 is a tiny 3.3-V BLE Bluetooth 4.0 module based on the TI CC2540/CC2541 Bluetooth SoC. It can be controlled via AT commands, which are sent over the serial UART connection. Most of the latest HM-10 modules, though, are based on the CC2541 chip, with lower power and a shorter range than the former CC2540 version. Cheap clones are cleverly pointed as CC2541, may be CC2540. Their hardware-firmware ombination has some issues (that is a long topic). Original HM-10 manufactured by Jinan Huamao technology Co.) is back version of the chip. Detecting clone is not closest to easy. You will see, original HM-10 itself has many versions :

http://www.jnhuamao.cn/bluetooth.asp

You should try to buy genuine HM-10.

 

Arduino Bluetooth Remote Control : First Wirelessly Control a LED

 

For this purpose, we need :

  1. One HM-10 Bluetooth module
  2. Arduino Uno
  3. Breadboard
  4. Jumpers
  5. One LED
  6. One 220 Ohm resistor

Connect HM-10 bluetooth module with Arduino Uno in this way :

Module’s VCC –> Arduino Uno’s 3.3V or 5V
Module’s GND –> Arduino Uno’s GND
Module’s TX –> Arduino Uno’s digital pin 10
Module’s RX –> Arduino Uno’s digital pin 11

Arduino Bluetooth Remote Control Tutorial

Test serial output with the above setup (without LED) with this sketch :

#include 
SoftwareSerial mySerial(10,11);
void setup()
{
mySerial.begin(9600);   
Serial.begin(9600);   
delay(100);
}
void loop()
{
if (Serial.available()>0)
mySerial.write(Serial.read());
if (mySerial.available()>0)
Serial.write(mySerial.read());
}

Install BLE Scanner App on Android mobile phone and scan. You will get the module. Default passcode to pair usually something like 123456789 or 0000000000 (9 zeros) or 111111111 (9 ones). After getting paired, you will get a list of services of the module. The last on the list will be “custom service”. On the custom service menu, there will three icons bearing the letters R (Read), W (Write) and N (Notify). Tap the W icon, type the text and send. The sent text will appear on the serial monitor. In this way, you can print data on LCD display too.

Many of the new readers, users noticed that AT commands used for these devices. AT commands in short is just sending command from the serial terminal.

Next, we will control LED from the Android Smartphone. Arduino already has a led at pin 13, so it is optional to connect the LED on breadboard with pin 13.

int ledPin = 13;
char read_bt;

void setup() {
  pinMode(ledPin, OUTPUT); 
  Serial.begin(9600);     // debug on serial port
}

void loop() { 
  if (Serial.available() > 0) {

  read_bt = Serial.read();
  if(read_bt=='A')
   digitalWrite(ledPin, HIGH);  

   if(read_bt=='B')
   digitalWrite(ledPin, LOW);  
  }
}

Notice the lines :

...
  if(read_bt=='A')
... 
   if(read_bt=='B')
...

A and B are custom labels of button on Android mobile. Any Android App for this purpose which supports editing of button name will work with it. We can control it from PC/Mac serial terminal too, this is example code :

#include 
int led = 13;

SoftwareSerial Bluetooth(10, 11);

void setup() {  
  Serial.begin(9600);
  Bluetooth.begin(9600);
  pinMode(led, OUTPUT);
}

void loop() {  
  int command;
  
  if (Bluetooth.available()) {
    command = Bluetooth.read();  
    Serial.println("Input received:");
    if (command != 0)
    {
      Serial.println("0 / ON");
      digitalWrite(led, HIGH);
    }
    else
    {
      Serial.println("1 / OFF");
      digitalWrite(led, LOW);
    }  
  }
}

This is the first part of the guide to get used around controlling DC operated device, like LED. Next guide will be on integrating the relay to control a test AC bulb.

Tagged With 8 channel relay arduino bluetooth control , bluetooth remote for arduino , arduino bluetooth remote control , arduino wireless remote control , bluetooth remote to control Arduino uno , arduino bluetooth part , arduino bluetooth remote , windows 10 remote arduino tutorials , arduino bluetooth controlled laptop , arduino as bluetooth transmitter

This Article Has Been Shared 500 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Arduino Bluetooth Remote Control Tutorial : Part I

  • Convert Computer Power Supply To Breadboard Power Supply

    Convert Computer Power Supply To Breadboard Power Supply. We Started From How To Start An ATX Or SFX PSU And Ended At Lab Bench Power Supply.

  • Arduino Compatible STM32 Boards (ARM Cortex Boards)

    Arduino Compatible STM32 Boards Has Dual Advantage of Being Arduino Compatible and Also Support For ARM Cortex Way of Programming. Of course they are cheap & Powerful.

  • Arduino : Make LED ON One at a Time Using a Potentiometer

    We Can Use the On-Board ADC to Convert Number Between 0 and 1023 Rotating Shaft. Here is How to Make LED ON One at a Time Using a Potentiometer With Arduino.

  • Arduino : Blink Two LEDs Alternatively

    Common Example of Arduino is To One LED. We Can Make Arduino To Blink Two LEDs Alternatively in Various Ways of Coding.

  • Arduino : Blink LED and Beep Every X Seconds Upon Push Button Press

    Previously we have shown beep with key press and LED lightening up and projects like Arduino Traffic Light, Arduino TM1637 with RTC. Here is How To Blink LED and Beep Every 1 Second With Arduino Upon Push Button Press. We Will Discuss Many Ways To Achieve The Goal Including Using RTC. Arduino has many ways […]

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • The Importance of Voice and Style in Essay Writing April 1, 2023
  • What Online Casinos Have No Deposit Bonus in Australia March 30, 2023
  • Four Foolproof Tips To Never Run Out Of Blog Ideas For Your Website March 28, 2023
  • The Interactive Entertainment Serving as a Tech Proving Ground March 28, 2023
  • Is it Good to Run Apache Web server and MySQL Database on Separate Cloud Servers? March 27, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Arduino Bluetooth Remote Control Tutorial : Part I," in The Customize Windows, December 2, 2018, April 1, 2023, https://thecustomizewindows.com/2018/12/arduino-bluetooth-remote-control-tutorial-part-i/.

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT