Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Syntax & Programs / arduino board and andriod phone interfacing on: December 20, 2010, 01:48:39 am
Hi guys,

I am working on project where I am using an arduino mega and a bluetooth module to send a simple text to the andriod phone. I can build the program but I cant get to send the signal over to the phone.  The program structure is such , Once the led is high , the buzzer goes on and the signal is sent out to the HTC phone. Can somebody with a kind soul please help me with my program below.

best regards
nash


#include <MeetAndroid.h>

MeetAndroid meetAndroid;

int buzzer = 48;                                 // Buzzer connected to digital pin 48
int ledPin = 50;                              // the number of the LED pin 50

// variables will change:
int ledState = 0;                                 // variable for reading the led status


void setup()
{
 pinMode(ledPin,INPUT);                              // pin 13 led as OUTPUT
 pinMode(buzzer, OUTPUT);                         // pin 48 buzzer as OUTPUT
 Serial.begin(115200);                           // start serial communication at 115200bps
                        

}

void loop()
{
  ledState = digitalRead(ledPin);
 
 if( ledState == HIGH  )                            // if 'HIGH' was received
 {
   digitalWrite(buzzer, HIGH);                // turn ON the buzzer
   delay(1000);
   Serial.print("Door is opened\r\n");         // print the message when the Mega received input from Serial1
   delay(5000);  // delay 5 seconds
   meetAndroid.receive();                   // read input pin and send result to Android
   meetAndroid.send(digitalRead(ledPin));   // add a little delay otherwise the phone is pretty busy
 delay(1000);
 }
 else
 {
   digitalWrite(buzzer, LOW);            // otherwise turn it OFF
    delay(1000);                         // wait 1000ms for next reading

 }
 
}
2  Forum 2005-2010 (read only) / Interfacing / Re: arduino communication with a android on: December 20, 2010, 11:20:32 pm
Sorry guys,

I wasn't sure that cross posting was a illegal thing. I was just trying to get my options wider.

best regards
ganesh  
3  Forum 2005-2010 (read only) / Interfacing / Re: arduino communication with a android on: December 20, 2010, 02:37:50 am
Hey bro, I followed the instructions from the below URL. I dowloaded the software which I was told into my htc phone. I paired it up with my bluetooth. I aint sure whether my program is right. so as to narrow down to the problem. The amarino software helps to retrieve data from the bluetooth itself. I am most probably sure it has to be the program.

best regards
ganesh  

http://www.amarino-toolkit.net/
4  Forum 2005-2010 (read only) / Interfacing / arduino communication with a android on: December 20, 2010, 01:45:07 am
Hi guys,

I am working on project where I am using an arduino mega and a bluetooth module to send a simple text to the andriod phone. I can build the program but I cant get to send the signal over to the phone.  The program structure is such , Once the led is high , the buzzer goes on and the signal is sent out to the HTC phone. Can somebody with a kind soul please help me with my program below.

best regards
nash


#include <MeetAndroid.h>

MeetAndroid meetAndroid;

int buzzer = 48;                                 // Buzzer connected to digital pin 48
int ledPin = 50;                              // the number of the LED pin 50

// variables will change:
int ledState = 0;                                 // variable for reading the led status


void setup()
{
  pinMode(ledPin,INPUT);                              // pin 13 led as OUTPUT
  pinMode(buzzer, OUTPUT);                         // pin 48 buzzer as OUTPUT
  Serial.begin(115200);                           // start serial communication at 115200bps
                          

}

void loop()
{
   ledState = digitalRead(ledPin);
  
  if( ledState == HIGH  )                            // if 'HIGH' was received
  {
    digitalWrite(buzzer, HIGH);                // turn ON the buzzer
    delay(1000);
    Serial.print("Door is opened\r\n");         // print the message when the Mega received input from Serial1
    delay(5000);  // delay 5 seconds
    meetAndroid.receive();                   // read input pin and send result to Android
    meetAndroid.send(digitalRead(ledPin));   // add a little delay otherwise the phone is pretty busy
  delay(1000);
  }
  else
  {
    digitalWrite(buzzer, LOW);            // otherwise turn it OFF
     delay(1000);                         // wait 1000ms for next reading

  }
  
}
5  Forum 2005-2010 (read only) / Interfacing / Regarding arduino + iphone on: November 23, 2010, 11:55:10 pm
HI i am holding on to a arduino mega board and a bluetooth module form sparkfun. I want to send a simple msg to the iphone via bluetooth. is it possible. does anybody have codes on my description. It would be of great help......
6  Forum 2005-2010 (read only) / News / Re: How to pronounce "Arduino" ? on: November 01, 2010, 12:47:16 am
oh. interesting...
Pages: [1]