// Juan Antonio Villalpando // juana1991@yahoo.com // http://kio4.com/appinventor/9bluetootharduino.htm char dato; int LED13 = 13; ///////////// Arduino a Android const int boton2 = 2; const int boton3 = 3; int boton2_read = 0; int boton3_read = 0; void setup() { Serial.begin(9600); pinMode(boton2, INPUT); pinMode(boton3, INPUT); pinMode(LED13, OUTPUT); } void loop(){ boton2_read = digitalRead(boton2); boton3_read = digitalRead(boton3); if (boton2_read == HIGH) { Serial.println("Hola amigo"); delay(800); } if (boton3_read == HIGH) { Serial.println("Me llamo Juan"); delay(800); } ///////// Android a Arduino /// LED 13 ON/OFF if( Serial.available() ) dato = Serial.read(); if( dato == '0' ) { digitalWrite(LED13, LOW); } if( dato == '1' ) { digitalWrite(LED13, HIGH); } }