How to Use the amarino toolkit to connect Android phones and Arduino

Source: Internet
Author: User

Intelligent Robot

Introduction:

Amarino is an interesting application platform that enables connections between Android phones and Arduino. Currently, there are many plug-ins Based on amarino to solve various problems. And it is an open-source project.

Amarino is basically composed of three main parts:

  1. Android applications are called "amarino"
  2. The Arduino library is called "meetandroid"
  3. Amarino plug-in package (optional)

Amarino requires at least the following hardware:

  1. Android mobile phone (supporting Bluetooth; android2.2 and later)
  2. An Arduino Board (Lilypad, duemilanove, arduinobt ...)
  3. One of your Arduino Bluetooth modules
  4. Other Arduino modules (optional for root)

Important! Set your Bluetooth module to 57600 or 115200 port. Because some modules use 57600 (old) better, while some modules only use 115200 Potter, when you are connected but cannot send data, try to change the baud rate settings.

Start configuring the environment

  1. Configure the Arduino bluetooth module

    • Line connection diagram (remember that the RX of the bluetooth device is connected to the Arduino TX; The TX of the bluetooth device is connected to the Arduino RX)
  2. Download and install amarino_2.apk on your mobile phone. : Http://code.google.com/p/amarino/downloads/detail? Name=amarino_2_v0_55.apk & can = 2 & Q =

  3. Download and install amarinopluginbundle.apk: http://code.google.com/p/amarino/downloads/detail? Name=amarinopluginbundle.apk & can = 2 & Q =
  4. Download the Arduino development tool and decompress it. : Http://arduino.cc/en/Main/Software
  5. Download meetandroid,: http://code.google.com/p/amarino/downloads/detail? Name‑meetandroid_4.zip & can = 2 & Q =
  6. Decompress meetandroid to the libraries directory under the Arduino ide installation directory.
  7. Restart the Arduino ide. If it is normal, the meetandroid option should appear in (Sketch-> import library)

  8. Use # include <meetandroid. h> to write the Arduino program.

First connection and Test

Objective: To send a random number between 0 and to Arduino every 5s through the Bluetooth of Android mobile phone. When Arduino receives the random number, it lights up the LED (Port 13)

  1. Open the Arduino IDE and select "file-> examples-> meetandroid-> test"

  2. Modify serial. Begin (57600); Not all default rates are 57600. My bluetooth module is 9600

  3. Compile and upload test to Arduino. Remember to unplug the Bluetooth before downloading the program. Otherwise, an error occurs if the program is not downloaded to the Arduino board.
  4. Open the amarino program of the Android phone
  5. Click Add BT device to find the bluetooth device. If the bluetooth module is correctly installed, it will appear in the bluetooth device list, as shown in figure
  6. Click the bluetooth device to enter the device column. Click the red icon on the left to go to the following page:
  7. Click Add event to display plugln,
  8. Select Test event to go to the settings page. Click Save]
  9. Return to the bluetooth device list page and click Connect. The amarino program starts to send a random data (0-255) Every 5s, And the LED (Part 13) on the Arduino starts to flash.
  10. Running Effect

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.