Author Topic: How to Control Arduino Board Using an Android Phone and a Bluetooth Module:  (Read 1035 times)

0 Members and 1 Guest are viewing this topic.

contentor

  • Guest
In this tutorial you'll learn how to use a bluetooth module and MIT's app inventor to create a wireless serial link between an android phone and an arduino board. Here is a short video showing an example app. This article will describe how to do the wiring, write an
Arduino sketch that can accept basic commands and send them and how to write the app itself. It's assumed that you're already familiar with some of the basics, you made a few arduino projects and are familiar with the arduino IDE. If you have attempted serial communication with the Arduino and  Arduino Starter Kiteverything should be fully comprehensible. If you have any problems or questions feel free to ask them on the discussion page.


Step 1---Use the following arduino code. Feel free to modify it. The important aspect here is the baud rate - make sure it matches the baud rate of your module - check the datasheet or use AT commands to do it.
const int ledPin = 2; // the pin that the LED is attached to byte serialA; void setup() { // initialize the serial communication: Serial.begin(19200); //baud rate - make sure it matches that of the module you got: // initialize the ledPin as an output: pinMode(ledPin, OUTPUT); } void loop() { if (Serial.available() > 0) {serialA = Serial.read();Serial.println(serialA);} switch (serialA) { case 1: digitalWrite(ledPin, HIGH); break; case 2: digitalWrite(ledPin, LOW); break; case 3:digitalWrite(ledPin, HIGH); delay(100); digitalWrite(ledPin, LOW); delay(100); default: break; } }

Step 2-->If all you want is to get the app and see it running then download the app then upload it to your phone. Download at -> drive.google.com/folderview?id=0B_PfPoEotOF8N2JwT3RSX011SjQ&usp=sharing Your phone has to be set to allow apps from outside the android market/google play to be able to download them - so check the settings on your mobile.



Step 3-->If you want to modify the app go to appinventor.mit.edu/explore/learn.html to find out how to prepare your computer and install App inventor software. Once you have it running, do at least one or two of their basic tutorials. Below is the source of the app used here. You can upload it to the app inventor and then upload to your phone or modify it. drive.google.com/folderview?id=0B_PfPoEotOF8N2JwT3RSX011SjQ&usp=sharing




Cheap Arduino Compatible’s announcement: Microcontroller Kit, Raspberry Pi

1,000 Leads Daily - 3 Day Risk Free Trial

Business Opportunity Leads!


Thankston11

  • Guest
Android Data Recovery can recover messages, contacts, photos and video from/on Android phones and tablets.

Directly recover deleted SMS text messages and contacts
Retrieve photos and video lost due to deleting, restoring factory settings, flashing ROM, rooting, etc., from SD cards inside Android devices
Preview & selectively recover messages, contacts and photos before recovery
Support multiple Android phones and tablets, like Samsung, HTC, LG, Motorola, and so forth
Only read and recover the data, no personal info leaking

How to Restore photos from Android phone
How to Retrieve data from Android phone
How to Recover Deleted Data from Android SD Card
How to Restore Deleted Contacts from Android Phones

1,000 Leads Daily - 3 Day Risk Free Trial

Business Opportunity Leads!


 

P.S. Do you want to see how we made $14,178.00 Dollars Last Month?

Click Here For All The Info!

Free Advertising Forum Post Ads Online