reconnaissance vocale, android, bluetooth et arduino

bonjour
je suis tombé sur ça

Par "saine" :grin: curiosité j'ai testé avec un HC06 , et le soft avec un vieux galaxy ACE sous android 2.2.1 et j'avoue que je suis assez "bluffé" , la reconnaissance du "français" est plutot bien supportée.

J'ai un peu modifié le sketch arduino , pour y incorporer un peu de français, le HC06 en software serial , une duplication "de la reconnaissance" sur le serial monitor et l'utilisation de la led13 pour simple test.
.

//Coded By: Angelo Casimiro (4/27/14)
//Voice Activated Arduino (Bluetooth + Android)
//Feel free to modify it but remember to give credit
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(2, 3); // RX | TX HC06 sur software serial
// RX arduino <--- TXD cible 
// TX arduino ---> RXD cible
String voice;
int 
led1 = 13, //Connect LED 1 To Pin #13 on board arduino 
led2 = 4, //Connect LED 2 To Pin #4
led3 = 5, //Connect LED 3 To Pin #5
led4 = 6, //Connect LED 4 To Pin #6 
led5 = 7; //Connect LED 5 To Pin #7 
//--------------------------Call A Function-------------------------------//  
void allon(){
     digitalWrite(led1, HIGH); 
     digitalWrite(led2, HIGH); 
     digitalWrite(led3, HIGH); 
     digitalWrite(led4, HIGH); 
     digitalWrite(led5, HIGH); 
}
void alloff(){
     digitalWrite(led1, LOW); 
     digitalWrite(led2, LOW); 
     digitalWrite(led3, LOW); 
     digitalWrite(led4, LOW); 
     digitalWrite(led5, LOW);
}
//-----------------------------------------------------------------------//  
void setup() {
  Serial.begin(9600);
  BTSerial.begin(9600);  // vitesse software serial
  pinMode(led1, OUTPUT); 
  pinMode(led2, OUTPUT); 
  pinMode(led3, OUTPUT); 
  pinMode(led4, OUTPUT); 
  pinMode(led5, OUTPUT); 
}
//-----------------------------------------------------------------------//  
void loop() {
  while (BTSerial.available()){  //Check if there is an available byte to read
  delay(10); //Delay added to make thing stable 
  char c = BTSerial.read(); //Conduct a serial read
  if (c == '#') {break;} //Exit the loop when the # is detected after the word
  voice += c; //Shorthand for voice = voice + c
  }  
  if (voice.length() > 0) {
    Serial.println(voice); // duplication du VR sur le serial monitor
//-----------------------------------------------------------------------//    
  //----------Control Multiple Pins/ LEDs----------//  
       if(voice == "*all on") {allon();}  //Turn Off All Pins (Call Function)
  else if(voice == "*stopper tout"){alloff();} //Turn On  All Pins (Call Function)
  
  //----------Turn On One-By-One----------// 
  else if(voice == "*allumer 13") {digitalWrite(led1, HIGH);} 
  else if(voice == "*fan on") {digitalWrite(led2, HIGH);}
  else if(voice == "*computer on") {digitalWrite(led3, HIGH);}
  else if(voice == "*bedroom lights on") {digitalWrite(led4, HIGH);}
  else if(voice == "*bathroom lights on") {digitalWrite(led5, HIGH);}
  //----------Turn Off One-By-One----------// 
  else if(voice == "*stop 13") {digitalWrite(led1, LOW);} 
  else if(voice == "*fan off") {digitalWrite(led2, LOW);}
  else if(voice == "*computer off") {digitalWrite(led3, LOW);}
  else if(voice == "*bedroom lights off") {digitalWrite(led4, LOW);}
  else if(voice == "*bathroom lights off") {digitalWrite(led5, LOW);}
//-----------------------------------------------------------------------//  
voice="";}} //Reset the variable after initiating

sympa mais y a t'il un moyen de trouver le fichier apk d'install android?

Bon finalement je l'ai trouvé là mais je ne sais pas si c'est le bon, pas encore testé
http://www.1mobile.com/android-meets-robots---voice-716850.html

john_lenfr:
sympa mais y a t'il un moyen de trouver le fichier apk d'install android?

Bon finalement je l'ai trouvé là mais je ne sais pas si c'est le bon, pas encore testé
http://www.1mobile.com/android-meets-robots---voice-716850.html

Bonsoir John
j'ai installé à partir du lien fourni sur instructable là

Oui oui je l'avais vu ce lien mais je n'aime pas les liens temporaires quand je prévois de tester plus tard.
Je n'aime pas être dépendant d'une solution "en ligne" qui peut disparaître à tout moment.
Et puis après c'est pas dit que si son prog marche bien cela ne devienne pas payant

:wink:

john_lenfr:
Oui oui je l'avais vu ce lien mais je n'aime pas les liens temporaires quand je prévois de tester plus tard.
Je n'aime pas être dépendant d'une solution "en ligne" qui peut disparaître à tout moment.
Et puis après c'est pas dit que si son prog marche bien cela ne devienne pas payant

:wink:

Bonjour John
oui , c'est sur que ce n'est pas la panacée, mais ça permet de faire simplement quels que tests quand meme bien sympa
à peu de frais (dans la mesure où l'on dispose déjà d'un appreil android)

Oui.

J'attends mon module bluetooth pour tester tout ça (ma commande DX :D) donc en attendant j'ai mis les infos de côté :grin: