RobotUI Setup Guide
If you have already performed the setup below, you can continue onto the development guide.
Summary of first time setup
Step 1. Build a simple circuit
The simplest circuit you can make using a HC-06 is shown below. This particular circuit shows an Arduino Nano (which could be swapped out with another Arduino e.g. the Uno or Mega).
It shows a HC-05, but you can use a HC-06 too. It shows 3 resistors of the same value, 2 in parallel and 1 in series. The value is not important as long as they are all the same.
The intention of the resistors is to drop the 5V signal coming from the Arduino down to 3.3V to make it compatible with the HC-05/06. I show a 9V battery here for the purposes of
making the circuit standalone and portable, but while powering the Arduino from the USB during development/programming, the battery is not required and should be disconnected.
Common arduino pins
- GND - Connected to the GND of the HC-05/06, the negative terminal of the 9V battery and one end of the single resistor.
- 5V - Connected to the VCC of the HC-05/06
- VIN - Connected to the positive terminal of the 9V battery
Arduino Uno or Nano pins
- pin 2 - Blue wire, connected to TX of HC-05/06
- pin 3 - Yellow wire, connected to two parallel resistors, which are connected to RX of HC-05/06
Arduino Mega pins
- pin 50 - Blue wire, connected to TX of HC-05/06
- pin 49 - Yellow wire, connected to two parallel resistors, which are connected to RX of HC-05/06
Step 2. Download and install RobotUI library
- Go to https://bitbucket.org/NeilMartin/robotui/downloads/
- Click on the "download repository" link, and a zip file will be downloaded
- In your Arduino IDE, select Sketch->Include Library->Add Zip Library and navigate to the ZIP file downloaded in the previous step.
- If you prefer you can also manually install the library, check http://www.arduino.cc/en/Guide/Libraries
for the latest instructions on how to install libraries for your Arduino IDE.
- Shut down and reopen your Arduino IDE so that the Example projects appear in the menu
Step 3. Install RobotUI app
Go to the Google Play Store on your Android device and install the RobotUI app. NOTE, your Android device must have bluetooth for this application to work.
Step 4. Upload the RobotUI examples
- Open your Arduino IDE
- Connect the simple circuit constructed in Step 1 to your PC using a USB cable
- Select the appropriate target board within the Arduino IDE with the Tools->Board menu
- Open the ExampleUI1 project in the Arduino IDE using the File->Examples->RobotUI->ExampleUI1. If ExampleUI1 is not in your examples menu, then something
went wrong with Step 2. Download and install RobotUI library.
- Use the Verify button to compile the example
- Use the upload button to upload ExampleUI1 to your Arduino
- Open the RobotUI app on your Android device (it may ask you to enable bluetooth)
- If this is the first time using your HC-06 bluetooth module, you will need to pair it with your device. Click the "Pair with new device" button, select your device from the list,
enter the pin number (default is 1234 if you haven't set it yourself)
- If this isn't the first time using your HC-06 module, then select it from the list
- A UI should appear on the phone. That UI was defined by the ExampleUI1 code stored on your Arduino.
- Congratulations, you have set up your first UI. Try the other examples. When you are ready to create your own UI, go to the development guide