
kamaroman68
USA
Asked
— Edited
Very simple logic, just don't know the commands in ARC... Just added a maxbotics analog distance sensor. It works in ARC. What I would like is when the distance is equal to or less than 50 speak out the ezb. I set up an analog port and I'm trying to use the adc wait command, from there? Thanks Chris
Simply use a repeatwhile(1 > 0) for a forever loop
So;
You can click the stop button or run a ControlCommand to stop a script so there's no need for an escape variable.
Or, if you wanted the value displayed;
In the above example you could replace the repeat with a simple :label and Goto()
OK so my saga continues..... at first all I wanted was to speak when an object was detected in its path. But after thinking about this, and already having the movement of the robot scripting in place (sort of) I would like to add to the complications. I looked at Rich's Ping roam script on the cloud but it didn't help much. What I have is one controller ezb4 in the robots head and one down at the drive base. The head board will need to interact with the base board as the head sensors are being used to determine distance to object. So..... I would like the robot to move on voice command, when approaching an object in path stop, say "I have detected an object in my path" Sleep(1000) then ask if it should proceed moving. An answer of yes will allow it to proceed while an answer of no well that's obvious... Any help is appreciated... Chris
That's pretty simple. Do you want to be spoon fed or do you want the menu?
When using 2 boards you will need to tell the script commands which board to use (where applicable). This is denoted by the board number before the port i.e. Servo(0.D0, 60) or Servo(1.D0, 60)
The scripts provided so far should be a good base. but change the commands within the IF or after the ADC_Wait.
You want to use WaitForSpeech()
and an IF to determine what to do. Check both out in the script manual.