Asked
— Edited
So I'm gritting my teeth try to figure out why the SayEZB command keeps repeating the phrase over and over. Usually around three times but not always.
When no scripts are running it functions normally.
When I start running 3 scripts, which are similar but monitor a different digital port.
:loop
IF (GetDigital(D14) = 1)
ControlCommand("PersonalityScripts", ScriptStart, "EarStalkLeftFlash")
ENDIF
WaitForChange(GetDigital(D14))
goto(loop)
It starts happening
It still exhibits the same behavior with the ControlCommand() commented out. I've been trying to set up a unit test but I can't seem to get the issue narrowed down.
Any one experienced this issue? Or have any insight as to what is happening?
ah, interesting - I think I know why... wait for change will loop with no delay. Which means if it is waiting for the digital port to change, it will send a kabillion commands per second and flood the communication channel.
Use this instead of WaitFor() when dealing with digital... Also, I recommend 100 or so ms while playing audio. Experiment and see what works best.
Ok thanks, will proceed with your suggestions.
I have been noticing the communication channel effect when polling sensors, especially the analog ones. It seemed the sleep sweet spot was 500 milliseconds but I was making a lot of assumptions about what was going on.
Speaking of the communication channel is there anyway to measure the performance other then experiencing lag between ezb and ARC? I wanna ask more questions concerning sampling, commands per second but just not sure what to ask yet...
Check out the benchmark control
Thank you @Rich for pointing out the obvious to me. Blush.
Thanks for having patience with us newbs.