Topic outline

  • General

    Arduino : Bluetooth

  • Topic 1

    Who was Bluetooth?

    The Ericsson website states that the technology is named after Harald Bluetooth, a Viking that promoted communication between Denmark and Norway. There is a statue of him outside Ericsson HQ!
    King Harald Bluetooth lived in Denmark between 910-940 AD.
    He was known for his unification of previously warring tribes from Denmark (including now Swedish Scania) and getting people to work together..

    With the advent of Bluetooth with low energy functionality (Bluetooth Smart or BLE), developers are now able to create small sensors that run off tiny coin-cell batteries for months, and in some cases, years.

    Many of these Bluetooth sensors use so little energy that developers are starting to find ways to use scavenged energy, like solar and kinetic, to power them—a potentially unlimited life from a power perspective.
    • This topic

      Topic 2

      Bluetooth

      Bluetooth is an open wireless technology standard for transmitting fixed and mobile electronic device data over short distances. Bluetooth was introduced in 1994 as a wireless substitute for RS-232 cables.

      Bluetooth communicates with a variety of electronic devices and creates personal networks operating within the unlicensed 2.4 GHz band. Operating range is based on device class. A variety of digital devices use Bluetooth, including MP3 players, mobile and peripheral devices and personal computers.
      Image result for bluetooth Sparkfun : Bluetooth basics
      Bluetooth is managed by the Bluetooth Special Interest Group (SIG), which has more than 30,000 member companies in the areas of telecommunication,

      The IEEE standardized Bluetooth as IEEE 802.15.1, but no longer maintains the standard. The Bluetooth SIG oversees development of the specification, manages the qualification program, and protects the trademarks.[7] A manufacturer must meet Bluetooth SIG standards to market it as a Bluetooth device.[8] A network of patents apply to the technology, which are licensed to individual qualifying devices.
      • Topic 3

        Connecting to Bluetooth

        In this section we look at how to connect bluetooth HC-06 cards ($3.50 USD each, from ebay) to your projects.

        The process requires the following components:

        An app on a smartphone that allows a user to direct/interact with a robot.

        A client "sketch" on an Arduino Uno that can interpret commands and control the motors/drive on a robot.

        The following hardware components are required to enable this to happen:

        • Android phone, with bluetooth
        • Bluetooth modem/reciever
        • Arduino Uno board
        • Motor Controller

        This is summarised on this diagram:

        Description of bluetooth robot systems
        • 2. Using Bluetooth to control your robots

          Bluetooth and Arduino


          In this section we look at how to connect bluetooth HC-06 cards ($3.50 USD each, from ebay) to your projects.


          The process requires the following components:


          An app on a smartphone that allows a user to direct/interact with a robot.

          A client "sketch" on an Arduino Uno that can interpret commands and control the motors/drive on a robot.


          The following hardware components are required to enable this to happen:

          Android phone, with bluetooth
          Bluetooth modem/reciever
          Arduino Uno board
          Motor Controller


          This is summarised on this diagram:

          Description of bluetooth robot systems



          • Topic 5

            nnn

            • Topic 7

              App writing for tired stressed teachers

              App writing is fun, and fairly easy.

              Firstly, go to http://appinventor.mit.edu/explore/get-started.html to find out how to join App Inventor 2 - a cloud-based development environment for android. You will need to click create apps, and set yourself up with an account.

              Make sure that you check out their tutorials, and do them. Invest 2h before you start to code anything - you should then be able to succeed. I stuffed my first time, because I dived into it. Including the tutorials, this app took me 6h to write.

              • Topic 8

                Install the App on your Android device

                Open Chrome or android Internet browser

                • go to my github repository https://github.com/Harristotle/Robotic-bluetooth-android-car/blob/master/RoboTroller.apk
                • Click "download" to download the file, then open the downloads in your app drawer and click on the file.
                •   Android will tell you that it can't install, and then direct you to the settings to let you this happen. (Settings-->security-->unknown sources, click allow)
                • The app will install.
                • Topic 9

                  nnn

                  • Wire up your Arduino and controller as shown in this diagram:
                  • Temporarily disconnect the tx and rx pins between the bluetooth and the arduino.

                  • between the bluetooth and the arduino.

                  • between the bluetooth and the arduino.

                  layout diagram for robot
                  • Topic 10

                    nnn

                    Running your robot

                    1) Switch on both the phone and the robot

                    2) First your phone must know the bluetooth cand. Go to bluetooth centre (swipe down from top of screen into settings), click on bluetooth, and scan for devices.

                    3) find HC06, and associate with it. The password is 1234, from the factory.

                    4) Open the RoboTroller app.

                    5) Click Choose bluetooth and select the HC06 device you paired with.

                    6) Now you can control the robot by pressing the direction buttons. You can change mode between step and run by pressing the button on the side.

                    • Topic 11

                      A worked Example

                      Published on 31 Dec 2015

                      This video demonstrates the steps to assemble out-of-the-box 4WD Arduino robot. All you need is just an Arduino board, a dual channel motor driver shield, a bluetooth module (eg. HC-06) and a 7.4V LiPo battery pack. The robot is finally controlled within minutes by an Android joystick app available on Google Play.

                      To get the Arduino sample code, just click this link: https://goo.gl/iDCNqU with the help of circuit diagram here: https://goo.gl/L3k9X8.

                      If you happen to use "ArduMoto" board as the motor driver as shown in this picture (https://goo.gl/xPSxUK), you may simply use this sample code: https://goo.gl/7H5hAx using this schematic diagram as the guidance: https://goo.gl/RyWeAx.

                      Or if you prefer the classic L298N type of motor driver as shown in the picture here (https://goo.gl/ZL0NlE) and the circuit diagram here (https://goo.gl/m7E8RR), then use this sample code: https://goo.gl/B5DHym.

                      Or else if you choose to stick with the 'super classic' Adafruit L293D Motor Driver Shield as shown here (https://goo.gl/AkVLsP) and here (https://goo.gl/xZEvM6), you may get the code here: https://goo.gl/YWJYfW with the help of circuit diagram as shown here: https://goo.gl/57rckQ.

                      Watch this app controls 2 servo motors simultaneously here: 

                      .

                      To watch the joystick app controls 3 wheeled omnidirectional robot, click here: .

                      Check out my new video of omnidirectional robot being controlled using Android smartphone via image processing (color tracking approach) at .

                      Watch my new videos featuring a 3WD omnidirectional robot performing obstacle avoidance task at  and localization challenge at  using Android smartphone as the main controller to carry out image processing job through color detection approach. For training session, watch it at .

                      Happy roboting! Thank you.

                      Background Music: "Little Idea" & "Love" - Bensound.com

                      Joystick app on Google Play (Full version):
                      https://goo.gl/2oMk0S

                      Joystick app Free version:
                      https://goo.gl/CWynPX

                      Joystick app Lite version:
                      https://goo.gl/xHtnZb

                      Joystick app Lite Free version:
                      https://goo.gl/58zAtg

                      BT Serial Monitor:
                      https://goo.gl/1lW49f

                      BT Serial Terminal:
                      https://goo.gl/Nqg7rx

                      Now you can track your device's current location for real-time people and property surveillance purpose using Telegram Messenger via this TeleGPS app: http://goo.gl/0umbFO.

                      • Topic 12

                        nnn

                        • Topic 13

                          Hacking the Code

                          So you think my graphics skills suck, do you? You could do so much better, could you? My app has an annoyance does it?

                          Software undergoes continuous improvement, or it dies. You can enjoy this RoboTroller app in another way - customise it, and make it your own. You can get the App Inventor source code from https://github.com/Harristotle/Robotic-bluetooth-android-car/blob/master/RoboTroller.aia    

                          Save it to a folder, and then use app inventor to import it as shown in this animated gif.

                          how to import app source code so that you can edit it
                          • Topic 14

                            nnn

                            • Topic 15

                              nnn

                              • Topic 16

                                nnn

                                • Topic 17

                                  nnn

                                  • Topic 18

                                    nnn

                                    • Topic 19

                                      nnn

                                      • Topic 20

                                        nnn