This write-up intends to teach you how to create a wireless link between an Arduino board and android phone with the help of MIT’s app inventor and Bluetooth module. The process starts from basic wiring and part list. To create one such link you will need breadboard, wires, resistor, an LED, Bluetooth serial module, and Arduino board. It might be a little complicated to get a Bluetooth module. A wide range of Bluetooth modules exist all over internet, therefore, you need to be a little sure before you get one. There are basically two classes of Bluetooth modules that differ from each other in terms of range. Of both devices you are using are class 1 you probably need to get the module that has a range of 100 meters.
Next, you need to work on the Arduino code. The first code written for this purpose goes like this:
Const int ledPin =2; //the pin that LED goes with byte serialA;
Void setup()
{
//initialize the serial communication:
Serial.begin (19200); //baud rate- the user needs to assure that the rate matches with the module they purchased:
// initialize the ledPin as an output
pinMode (ledPin, OUTPUT);
}
Void loop() {
If (Serial.available()>0) {serial = Serial.read(); Serial.println(serial);}
Switch (serial) {
Case1:
DigitalWrite(ledPin, HIGH);
Break;
Case 2:
DigitalWrite(ledPin, LOW);
Break;
Case 3:digitalWrite(ledPin, HIGH);
Delay(100);
digitalWrite(ledPin, LOW);
delay(100);
default:
break;
}
}
Next, you need to focus on the App inventor and app itself. To see this app in action, you will have to download and install it over your android phone. The link for this purpose is https://drive.google.com/folderview?id=0B_PfPoEotOF8N2JwT3RSX011SjQ&usp=sharing. The app can be modified further by accessing the link http://appinventor.mit.edu/explore/learn.html. The page offers all guidelines required for preparing your system and installing the software. The next part is about receiving data from the Arduino. For example, you can use a 18b20 temperature sensor. The board interacts with sensor with the help of 1 wire interface, then observes and registers the temperature using OneWire library and then communicated the readings via Bluetooth module at a gap of every 500ms.
The last part deals with remote sensor that you will need to download from OneWire library.
Filed Under: Reviews
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.