Members | Sign In
Legacy MOVI User Community Forum (readonly) > MOVI Projects
avatar

Converting variables to Strings

posted Jun 14, 2016 18:21:12 by StevenNelson
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!
page   1
2 replies
avatar
GeraldFriedland said Jun 14, 2016 18:28:45
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+"");


Just thought I let you know. Your project sounds amazing btw. Do you have a video?

Gerald
avatar
StevenNelson said Jun 14, 2016 19:49:47
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...:)

http://www.keuwl.com/electronics.html
Login below to reply: