Quick Start Guide

How to connect my phone to Arduino in 10 steps

This quick start guide assumes that you have installed Amarino on your phone and you have added the MeetAndroid library to your Arduino working environment. If not please got to Installation first.

Authenticate

1. Open your installed Amarino application and go to "Bluetooth Manager". "Enable Bluetooth" if it is disabled and "Scan for Devices". If your Arduino has a Bluetooth shield attached to it and it is powered on, you should find your Arduino Bluetooth device in the list of devices.

2. Bluetooth devices must be authenticated before they can talk to each other. To do so, click on your device and confirm that you want to pair.

3. A dialog should open explaining how to enter the authentication PIN. Pull down your notification bar (top of your phone screen) and select the "Pairing request". Enter your PIN! Normally it is 1234, 12345 or 0000 depending on your Bluetooth shield. If you authentication was successfull your device status should change from not paired to authenticated.

4. Once your device is authenticated you can set this device as default, so that Amarino knows to which device it should connect per default. Long press on your device entry and select "Set as default". Don't connect it yet. This comes later.
Note: "Set as default" will automatically set your default device in settings.

Wow this was tuff. But now you have successfully authentictated your device, which is required before we can connect to it. But connecting the devices comes later, just stick to the plan. Next we have to create a event collection.

Create Event Collection

5. Go back to the main menu and hit "Event Manager". This step was easy, wasn't it? But watch out, the next is more complicated!

6. Select "Add Event". Since we do this the first time it will ask you to create a collection first. A collection is a set of events. The toolkit supports many collections which is useful if you have not just one Arduino but many. Keep cool, for now one collection is all we need.
Alright, enter a name for your collection and hit "Create". The device address should be filled in already, so don't care too much for now about this (the address comes from setting your device to default before). The next thing you should see is a dialog box with a list of events. Search for the event called "Test Event" and select it. Now on your Event Manager screen you should see your collection name with one event in its list. This is exactly what we want for now.
Puhh this was a lot, but I promise the next steps are easier again.

Gratulations! Your phone is now ready to talk to Arduino. However Arduino is not ready yet, so let's start setting it up.

Arduino setup

7. Open your Arduino working environment and select "File->Examples->MeetAndroid->Test". As I said, short steps only.

8. Change the baud rate of your Bluetooth module to 57600 baud, especially if you do not use an Arduino BT board with built-in Bluetooth. When you buy a Bluetooth Mate or BlueSMiRF Gold Bluetooth module, normally the baud rate is set to 9600 or 115200. But this doesn't work well for most Arduinos. Set it to 57600 baud and make sure the baud rate of your Bluetooth module matches the baud rate in your Arduino sketch. All examples uses 57600 baud ( Serial.begin(57600) )

9. Upload the sketch to your Arduino. If your Arduino has no onboard LED connected to pin 13 you might put your own LED to pin 13 of your Arduino. You should already know how this works. Otherwise you should look it up on the Arduino website

Your phone is now set up, your Arduino is loaded with a test programm. So far so good. Now comes the great moment. Let's see if they understand each other.


Connect

10. Power on your Arduino with your Bluetooth shield attached to it. Take your Android phone and go to the main screen. Hit the big red button in the middle of the screen. It should start connecting. If your connection could be established the button changes to green.


Congratulations!!! Your Android phone speaks to your Arduino now.

If everything went right the big red button should be green and your led on pin 13 will blink every 5 seconds for 1 second.


Monitoring

To see what is going on in the background just hit the monitoring button and look at the communication process.