Today after I downloaded the latest update I tried to make a change in my Speech Recognition entrees and it would not let me save anything. When I tried to save I got the message "Santax error: This command requires 3 or 4 parameters. You passed 3". Not sure if the update is the cause but this is when I first noticed it.
Also I cant get any command to start that's listed in the Speech Recognition entree section. I see the phrase typed out in the little window after I speak it so I know it hears me but nothing happens. I can start the different controls myself (MP3 trigger, scripts, turn on and off ports) but the SR wont start them.
As far as I know I didn't change any of the command formatting. Here's a couple phrases with the command after it:
Danger Will Robenson - controlcommand("Will Robenson", scriptstart) Two steps forward my mechanical friend - MP3TriggerPlayTrack( d0, 38400, 5)
In addition to this, Friday I just added a second EZ-B board to my project. Maybe that had something to do with the above problem? Along with this I'm also started having a problem with the script I copied from DJ's examples; "motor & potentiometer" not showing $adcCurrent info in the "Variable Watch" panel. I have a pot hooked up to a DC motor that is controlled by an H-Bridge. This script was also working before I added the second board and moved this set up to the new board. Before the move the values in that window would move from 10 to 200 depending where I turned the pot to and it turned on and off ports properly. It now shows 1.0, the value wont move, and only one port will turn on and stay on. It could be just me not knowing the proper place to show the script where to look for the ADC port but I just don't know.
I have a post about the Pot & Motor problem in the ARC category. It has a copy of my script. Look here: https://synthiam.com/Community/Questions/2134
Also I have a copy of my project in the EZ-Cloud section titled "B9 Robot Control 1" if you'd like to look it over.
Thanks for any help, Dave Schulpius
Ahh! Today's update fixed my problem. Now EZ-B supports Variable assignment and IF conditioning across multiple EZ-B boards. Now I don't have to run cables from the top of my robot, 4 foot to the bottom just to get to the first board's ADC ports! Everything is right in my world and working good.
I did have to modify DJ's Motor & Potentiometer Script example in ARC to get my setup to work properly. For some reason the motor just shot past the $adcSpecified value sent to the main script by the call script. Maybe it's the pot I'm using. Anyway the value returned by the ADC port seemed to lag and the motor would not stop when it got to the value it was looking for. This line controls the stop command:
if ($adcCurrent = $adcSpecified) goto(RotateStop)
I had to change the = in the above syntax to either a > or $adcSpecified) goto(RotateStop)
goto(Start)
:RotateRight 1.PWM(D2, 100) 1.Set(d1, on) 1.Set(d0, off) Return()
:RotateStop 1.Set(d1, off) 1.Set(d0, off) Halt()
:Error Say("There is no specified position to move too")
#Call Script for the motor to move left:
This script will move the motor into the
left position
$adcSpecified = 95 ControlCommand("you script name here", scriptStart)
#Main script for the motor to move Left:
This script will move an HBridge to
the specified Left ADC value.
if ($adcSpecified = 0) goto(Error)
:Start
1.$adcCurrent = GetADC(adc0)
if ($adcCurrent > $adcSpecified) goto(RotateLeft)
if ($adcCurrent < $adcSpecified) goto(RotateStop)
goto(Start)
:RotateLeft 1.PWM(D2,40) 1.Set(d1, off) 1.Set(d0, on) Return()
:RotateStop 1.Set(d1, off) 1.Set(d0, off) Halt()
:Error Say("There is no specified position to move too") **************************************************88
Hope this helps someone. If anyone sees a better way please speak up but this is working nicely for me.
Thanks to everyone who helped me with this and to DJ for his quick fixes!
Keep having fun, Dave Schulpius