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:
- Android applications are called "amarino"
- The Arduino library is called "meetandroid"
- Amarino plug-in package (optional)
Amarino requires at least the following hardware:
- Android mobile phone (supporting Bluetooth; android2.2 and later)
- An Arduino Board (Lilypad, duemilanove, arduinobt ...)
- One of your Arduino Bluetooth modules
- 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
- 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)
- 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 =
- Download and install amarinopluginbundle.apk: http://code.google.com/p/amarino/downloads/detail? Name=amarinopluginbundle.apk & can = 2 & Q =
- Download the Arduino development tool and decompress it. : Http://arduino.cc/en/Main/Software
- Download meetandroid,: http://code.google.com/p/amarino/downloads/detail? Name‑meetandroid_4.zip & can = 2 & Q =
- Decompress meetandroid to the libraries directory under the Arduino ide installation directory.
- Restart the Arduino ide. If it is normal, the meetandroid option should appear in (Sketch-> import library)
- 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)
- Open the Arduino IDE and select "file-> examples-> meetandroid-> test"
- Modify serial. Begin (57600); Not all default rates are 57600. My bluetooth module is 9600
- 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.
- Open the amarino program of the Android phone
- 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
-
- Click the bluetooth device to enter the device column. Click the red icon on the left to go to the following page:
-
- Click Add event to display plugln,
-
- Select Test event to go to the settings page. Click Save]
-
- 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.
-
- Running Effect