Reconocimiento de voz de una aplicacion de app inventor

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
PROCESADORES_2017_2
Date:
Tue Nov 28 14:26:30 2017 +0000
Commit message:
Reconocimiento de voz de una aplicacion de app inventor

Changed in this revision

PRUEBA.cpp Show annotated file Show diff for this revision Revisions of this file
TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PRUEBA.cpp	Tue Nov 28 14:26:30 2017 +0000
@@ -0,0 +1,69 @@
+//YULIETH BUELVAS - MIGUEL SERNA
+//TAREA 2- MBEB
+
+//Se deseaba realizar un reconocimiento de voz a traves de una aplicacion de app inventor y que la freescale recibiera
+//los valores de este reconocimiento de voz y encendiera los leds de la tarjeta y mostrara el color en la LCD de acuerdo a la
+// señal  recibida mediante bluetooth 
+
+#include "mbed.h"
+#include "Serial.h"
+#include "TextLCD.h"
+ 
+TextLCD lcd(PTB8, PTB9,PTB10,PTB11,PTE2, PTE3);
+Serial BT(D1,D0);
+DigitalOut Rojo(LED1);
+DigitalOut Verde(LED2);
+DigitalOut Azul(LED3);
+
+char c=0;
+
+int main(){
+    lcd.locate(5,1);
+    lcd.printf("BIENVENIDO");
+    
+    Rojo=1;
+    Verde=1;
+    Azul=1;
+    BT.baud(9600);
+    
+    while(1){
+        c = BT.getc(); //tomo lo que llega al HC-06
+        
+        if(c=='r') {         
+            Rojo = 0; //enciendo led rojo
+            Azul=1;
+            Verde = 1;
+            lcd.cls(); // Borrar Pantalla
+            lcd.locate(5,1);
+            lcd.printf("ROJO"); //imprimo en la lcd 
+         }
+          if(c=='v') {         
+            Verde = 0;//enciendo led verde
+            Rojo=1;
+            Azul=1;
+            lcd.cls(); // Borrar Pantalla
+            lcd.locate(5,1);
+            lcd.printf("VERDE"); //imprimo en la lcd 
+         }
+         if(c=='a') {         
+            Verde = 1;
+            Rojo=1;
+            Azul=0;    //enciendo led azul
+           
+            lcd.cls(); // Borrar Pantalla
+            lcd.locate(5,1);
+            lcd.printf("AZUL"); //imprimo en la lcd 
+        }
+        if(c=='y') {      
+        //como el amarillo es una combinacion de colores en la tarjeta enciendo 2 leds   
+            Verde = 0;   //enciendo led verde
+            Rojo=0; //enciendo led rojo
+            Azul=1;
+            lcd.cls(); // Borrar Pantalla
+            lcd.locate(5,1);
+            lcd.printf("AMARILLO"); //imprimo en la lcd 
+        }
+}
+}
+ 
+               
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Tue Nov 28 14:26:30 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/avallejopo/code/TextLCD/#aba8ab3dde9d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Nov 28 14:26:30 2017 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/fb8e0ae1cceb
\ No newline at end of file