Pages: 1 2 3 [4] 5 6 7   Go Down
Author Topic: Using android mobile to control arduino  (Read 88465 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi, kerimil ,, m sorry i was busy with my exams , i really thank u for ur support ,,please am also interessted with temp aplication , can u send me the code for the application , as you know i cant download from speedy ...
thnk u again dr kerimil..
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

another thing , i am trying to make my arduino read the device if its on or off , and to read it and then send the data to my phone throughout bluetooth .if its on the text tv is grean , if its off the text " tv" is red , so a user for example will not turn off a device witch is already off . do u think its a good idea ??
Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
please am also interessted with temp aplication , can u send me the code for the application , as you know i cant download from speedy
The source file can be downloaded from my google drive - the link is in my previous post

it's a zipped file - you have to upload it into app inventor


Quote
another thing , i am trying to make my arduino read the device if its on or off , and to read it and then send the data to my phone throughout bluetooth .if its on the text tv is grean , if its off the text " tv" is red , so a user for example will not turn off a device witch is already off . do u think its a good idea ??
That's doable - just write arduino sketch that reports the state of the TV through bluetooth
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, I was wondering would you be able to help me with problems I am having with my Android to ardiuno setup.
Basically what I am trying to do is making my phone read the voltage signal from the A0 port. I am using an ardiuno UNO. When I press button 8 on my phone, I can see the ardiuno print the voltage in the serial monitor. I was wondering would you know how to send the voltage back to the phone, and have it print out the voltage there.

Code:

byte serialA;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
serialA = Serial.read();
  if (serialA == 1)
  {
    int sensorValue = analogRead(A0);
    Serial.println(sensorValue);
    Serial.write(sensorValue);
    serialA = 0;


  }
}



* MITflow.jpg (116.88 KB, 894x729 - viewed 180 times.)
Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you use a bluetooth dongle and putty to check what is sent by both the phone and the arduino ??

Do so and you should see what's wrong  smiley
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

in application , i have label tv , then 2 buttons turn off and turn on ..
if i want to change the color of label TV due to its state , how can i do it ..
for example : if its already turned on so label TV is green , else its color is red ..
                 
« Last Edit: May 15, 2013, 01:29:09 am by moeabok » Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'm having fun with your example. But one problem though, how come the android doesn't recognize my "OFF" oral command?
Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So everything works but it does not recognize just the command ??

well if that's the case then apparently google voice engine returns something different than 'off' - modify the app to react to a different command.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it turns out that the android itself doesn't recognize many of my command such as "flash","apple","off","power","one","two". But it recognize my "banana", so now the OFF command is banana.
Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Heh yeah but you see the app works fine it's google voice recognition engine fault. I can't blame them really - lots of words sound very similar, there is ambient noise, lack of context and various accents.

I found that the best method is to use longer words or two word phrases. Apparently that makes it easier for the engine to recognize the command properly
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

so does the app inventor support phase command ?
Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

what is phase command ?? if you asking whether or not it can receive more than one word then the answer is yes
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello
i try to control the led  but nothing is ok
my sketch is:

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 49:
      digitalWrite(ledPin, HIGH);
      break;
    case 50:
      digitalWrite(ledPin, LOW);
      break;
    case 51:digitalWrite(ledPin, HIGH);
      delay(100);
      digitalWrite(ledPin, LOW);
      delay(100);
     default:

      break;
  }

}


I can control the led with my PC and the bluetooth v3
on/off/blink

my android ins connect to bluetooth (apaire ok!)

but nothing when i swith on
i dont know what  can i do?

thank you

With App programme i send 1, 2, 3

and my baud rate is 19200.

« Last Edit: July 04, 2013, 01:38:53 am by calou1 » Logged

0
Offline Offline
Full Member
***
Karma: 6
Posts: 229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you're rayrayan1 from instructables?? if so see my response there
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hello

i can choose the decive, but no connection will be establishe.
must i chance the baudrate to 9600?
if yes, where must i chance it n the app inventor?
« Last Edit: July 03, 2013, 12:56:27 pm by handyaner » Logged

Pages: 1 2 3 [4] 5 6 7   Go Up
Jump to: