About this app
Send your Arduino via Bluetooth, voice commands, and responds back to finish with Serial.print. You will receive your responses aloud from your mobile device!Arduino Example Code (the Arduino Example Code):
ReadString String = "";
#define LED 13 //
void setup () {
In pinmo (LED, OUTPUT);
digitalwrit (LEDs, LOW);
Serial.beg the (9600);
}
void loop () {
while (Serial.availabl A ()) {
char c = (char) Serial.read ();
ReadString + = c;
}
if (readstring.length ()> 0) {
if (ReadString == "open") {
digitalwrit (LEDs, HIGH);
Serial.print ( "opened");
}
else if (ReadString == "off") {
digitalwrit (LEDs, LOW);
Serial.print ( "closed");
}
else if (ReadString == "very few houses") {
// degree calculation processing and so on.
Serial.print ( "home now 21 degrees");
}
else if (ReadString == "speak English") {
Serial.print ( "Hi, how are you?");
}
else {
Serial.print ( "I do not understand you.");
}
ReadString = "";
}
delay (100);
}