Converting variables to Strings

I have been having a lot of fun using the MOVI with an Arduino Mega 2560. I was able to get the voice recognition to work fairly well using the built in microphone. I did run into a problem problem when I tried using the Say command with variables on the Arduino until I upgraded the Arduino IDE to the latest version and figured out how to use the String myVariable(variable); function. It would be nice in the future if the examples and manual made mention of this for the users. My first project is a Talking Tricorder using an Arduino Mega 2560 connected by Bluetooth to an Android device running the Bluetooth Electronics App and a bunch of sensors. It’s working!

Thanks for your feedback!


I use a different trick to convert variable to strings which should work in any IDE. I concatenate the variable with the empty string “”.



boolean lighton=false;

recognizer.say(lighton+"");

Hi Gerald, I haven’t made a video yet. I actually just got it working yesterday. Currently I’m reading a Parallax Ultrasonic PING distance sensor,an HCSR04 Ultrasonic distance sensor, a Sharp Infrared distance sensor and a DHT-22 temperature/humidity sensor. All of the sensors are controlled and displayed by an app that was easily created using drag and drop editing and the Bluetooth Electronics App from Keuwlsoft all of the sensor readings are also spoken by MOVI.

Combining these technologies is actually easy…:slight_smile:


http://www.keuwl.com/electronics.html