Go Down

Topic: Using android mobile to control arduino (Read 100651 times) previous topic - next topic

moeabok

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..

moeabok

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 ??

kerimil

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

Dennis0222

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: [Select]


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;


  }
}



kerimil

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  :)

moeabok

#50
May 09, 2013, 10:42 am Last Edit: May 15, 2013, 08:29 am by moeabok Reason: 1
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 ..
                 

ttttkk

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

kerimil

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.

ttttkk

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.

kerimil

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

ttttkk

so does the app inventor support phase command ?

kerimil

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

calou1

#57
Jul 01, 2013, 11:47 am Last Edit: Jul 04, 2013, 08:38 am by calou1 Reason: 1
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.


kerimil

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

handyaner

#59
Jul 03, 2013, 07:54 pm Last Edit: Jul 03, 2013, 07:56 pm by handyaner Reason: 1
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?

Go Up