Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Turning Digital Ports On/Off With Speech?

Hello all
When I'm using a Movement Panel the digital ports work (using "set digital" to verify, it turns red when off and green when it's on)
but somehow when I try to use speech control to turn the same port on, it doesn't work.

Can someone test this for me, or is this a possible bug?

Thanks all.
:P

AI Support Bot
Related Content
Synthiam
United Kingdom
#14  
Yeah, your script worked for me no problem and with no changes to sleeps. But, I am using a v4. Best to use Richards advice on this one. I had to do exactly that 1/2 hour ago with my project and solved my issue by doing what exactly what Richard has said about deleting components on a copied project.
#15  
@Richard R
It shouldn't matter if it's V3 or not...I'm just playing around with the software at work so i can test the shoulders when I get home...

Oh it's "Occam's Razor"...hah:D
#16  
I was just curious if you had received you V4 yet, that's all.... I just put salt in my eyes because of my spelling mistake...:P I will repent my friend:P
#17  
@Richard R

"Occum" haha I don't think it's a spelling mistake, it's a Freudian slip...what else are you doing on your computer eh? Careful the missus might catch you :D
#18  
@Marc.... she would be really bored if she went through my web history.... LOL
#19  
@all

I'll test this when I get home then I will resolve the issue. Thanks!
#20  
I would try to sleep for 5000 . Equals around 5 Seconds.

But if for the other person it worked fine . . . You may have a windows or memory problem. Or you may have to download and re-install ARC.

Good Luck!
#21  
@MovieMaker

Thanks for the help brotha...but I don't think it's a "sleep" problem...most of my test scripts don't even have sleep in between commands just usually at the end of the script block...I do think there is something interfering but I posted it here because i thought it could be a possible bug...

I laways use the latest ARC so it's not that, and I have a pretty decent laptop...
#22  
I tried this:

saywait("start test script")
set(D8, ON)
if(getdigital(D8) = "1")
saywait("digital eight is working")
elseif(getdigital(D8) = "0")
saywait("digital eight is not working")
endif

Of course I opened a "set digital" control to monitor it...
And like you guessed, when I run the script I get "start test script" and "digital eight is not working"....
United Kingdom
#23  
Have you tried it using a different port other than D8?
United Kingdom
#25  
Strange. I'm running out of ideas now. So the script runs ok on its own without voice recognition, correct? Are you running the script in the voice rec control as a script block, or a ControlCommand() in the phrase configuration?

In post #6 you posted a script you was using. Have you tried a simple set(D8,on) on its own in the script in the speech rec control?
#26  
@Doombot you need to remove the quotes from "1" and "0"...should be

Code:


if(getDigital(D8)=1)
saywait("it is working")
elseif(getDigital(D8)=0)
saywait("it is not working")
endif
PRO
Synthiam
#27  
1) Are you having trouble with D8 only?

2) Is your SET(on) and set(off) working for other ports?


Richard is correct, "Quotes" are for "Strings".

String
A string consists of alphanumeric characters to create words. "This" is a strong. So is "This". And "This is a string containing a sentence".

Example: $x = "This is a string"

Numbers
Numbers are simply numeric. A number is a 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 only. The only additional symbols you can use for numbers are a - (minus) and a . (decimal)

Example: $x = 3.14
#28  
@Dj

I just got home and tried it. Everything I did in the beginning worked, I just needed the EZb to be connected...very weird but it works.

@Richard R and @Dj
Thanks! I'm sure I know that (by now) I was just beat and I forgot...but thanks for the correction kind sirs.

On to testing! To those who care I'm just finishing up the cosmetics on my bot! Mechanically it's sound and ready to kill!

:D
United Kingdom
#29  
Sounds like you may have it sorted then. Looking forward to seeing the end results of your bot.:)
#30  
@ Doombot
Hi, Any pictures yet? The weather is getting nice, so I can't wait to see him by the Harley..

What was the final script you ended up with?

Ron
#31  
Doombot did this ever get completely resolved? I'm having very similar issue.
#32  
@ANDY ROID

Those are just test scripts, but I do use a lot of set() commands since I use a lot of motors and tip120 circuits...so i turn on/off digital pins a lot...

Oh no pictures just yet...


@kamaroman68
No it was resolved on it's own, since the test scripts i wrote worked when the EZb was connected...it wasn't working when the EZb is NOT connected. I don't know why...but instead of giving credit to anyone I just left it unresolved. What issue do you have? Maybe I can help...
PRO
Synthiam
#33  
yes, the EZ-B needs to be connected for any commands that communicate with the ez-b to work.

@Kamaroman68, do you have any additional information of what you're doing? To use speech recognition is very easy. Simply add the code to your voice command

1) load latest ARC

2) add speech recognition (controls -> add control -> audio -> speech recognition)

3) press GEAR config icon on speech recognition control

4) Enter a new phrase "turn digital port on"

5) press the script edit to edit the script for the new phrase

6) enter this script: SET(D0, ON)

7) Enter a new phrase "turn digital port off"

8) press the script edit to edit the script for the new phrase

9) enter this script: SET(D0, OFF)


Now say those two phrases and you will turn D0 on and off

If the speech is not being detected, press the ? (question mark) next to the X (close) to find out how to train your voice. Here's a direct link to the help for training your voice: http://www.ez-robot.com/Tutorials/Help.aspx?id=90