Bluetooth

Bluetooth uses radio waves to communicate. Here are some interesting facts about Bluetooth:

  • The consumer Bluetooth range is somewhere around 10 meters, but some industrial devices can communicate up to 100 meters apart.
  • Advancements in energy consumption mean that Bluetooth devices do not impact the battery performance as much as prior iterations.
  • Bluetooth beacons are low energy consuming transmitters that be attached to objects or placed in location. The signal it produces is sent at regular intervals and can trigger events on other Bluetooth devices such as notifying a nearby customer of discounts or help locating a lost pet.

In the coming exercises, we will use an Arduino Uno, which by itself does not have any wireless capabilities. To simulate a wearable, we will add a Bluetooth module that will allow it to communicate with an Android smartphone and access the internet.

 

Android application

We created a downloadable Android app to allow the Uno to access the internet. It is recommended that you download the file straight to your mobile phone. Before you can download a file, you need to change the following settings in your phone:

  • Go to “Settings”
  • Tap the Security button
  • Switch on “Unknown Sources”, and press “OK” in the following warning pop-up

The application was made using App Inventor: http://appinventor.mit.edu/explore/

Below is a illustration of how the Uno and smartphone interact.

This is how the communication works:

  1. Using the bluetooth connection, an API request(url) is sent from the Uno to the smartphone app.
  2. Using the smartphone’s internet, the app passes the request along to the server where the API is. (Note: The following is only true if you request information back from the server.)
  3. The request is processed and a reply is sent back to the smartphone app.
  4. The smartphone app then sends the information back to the Uno.

Now it’s time to build your own wearable project!