Use an Arduino with the IoTool Arduino extension

This guide will show you how to prepare your Arduino and Android device to work with IoTool and its Android extension. To support your own Arduino sensors with IoTool check out our IoTool Arduino Library here.

Overview

Skill level: Intermediate

Basic knowledge of Arduino IDE is recommended. To add your own measurements some knowledge of coding on Arduinos (C++) is needed.

Ingredients

  1. Android device (version 4.1 and up) with the latest IoTool app with sensor reading extension.

  2. An Arduino device with a Bluetooth module (ex. HC-06) OR Arduino/Genuino 101 with integrated Bluetooth.

  3. A working Arduino IDE environment on you PC and your Arduino board set up.

Step by step

Prepare your Arduino

  1. Connect the Blutooth module to your Arduino. Follow the instructions provided by the manufacturer/online community. Make sure that RX is connected to pin 0 and TX to pin 1. If you are using Arduino/Genuino 101 just continue with step 2.

  2. Plug the Arduino into your PC via USB.

Prepare the Arduino environment

  1. Download the IoToolArduinoLibrary.zip file.

  2. Open the Arduino IDE and wait for it to load.

  3. Open the Sketch menu, select Include Library and Add .ZIP Library…

    arduinolibinstall
  4. Select the downloaded IoToolArduinoLibrary.zip file.

Upload one of our example sketches

  1. Open the File menu in the Arduino IDE, select Examples, then find and select the entry IoTool. Pick the IoToolSensor example if or IoToolArduino101LE if you are using the Arduino/Genuino 101.

    arduinoexamples
  2. Check that you have the correct board profile and communication port selected.

    arduinoboard
    arduinoport
  3. Press the upload button and wait for the sketch to upload. image::arduinoupload.png[width=500]

Configure and use the IoTool application

  1. Install the main IoTool application and the IoTool Arduino extension.

  2. Launch the IoTool app, open the main drawer, and go to Settings.

    connect iotool cloud 1
    settings
  3. Click Sensors and find Arduino so you can configure it.

    sensor settings
  4. Select Choose Arduino Bluetooth MAC from the list, click Scan for devices and you should be able to select your Arduino.

    arduinobt
    arduinomac
  5. If you are using Arduino/Genuino 101 tick Use Bluetooth Low Energy.

    arduinoble
  6. Click Sync.

  7. Go back to Settings and choose Dashboard. image::settings.png[width=200]

  8. Set the required number of buttons and select the first one.

    iamge::dashboardsettings.png[width=200]

  9. Expand the Arduino submenu and select the desired measurement. Repeat steps 8 and 9 for all buttons and measurements that you wish to read.

    arduinosubmenu
  10. Go back to the Dashboard and press the start icon in the upper right corner. You should start receiving data from your Arduino. image::arduinodatadisplay.png[width=200]