Cognitive Vision icon Cognitive Vision — Microsoft Cognitive Vision integration for ARC: real-time object, face, emotion detection, OCR, confidence data and script-triggered robot actions. Try it →
Canada
Asked
2 Participants

Hi,       I Am Currently Lea

Hi,        I am currently learning code on ARC and I found myself stuck on a problem I was having. I was wondering how to create a list in a variable to store multiple values. ex. ($value="yes","no", "maybe". I was trying to figure out how to do this because I was trying to make a variable that has multiple values to easier execute the waitforspeech() command with multiple values that could be put into one variable.

ex. of what I was attempting to do: $value="yes","no","maybe" waitforspeech(10,$value)

Thanks!


ARC Pro

Upgrade to ARC Pro

ARC Pro will give you immediate updates and new features needed to unleash your robot's potential!

#1   — Edited

Here's an example that may help you

$response2 = WaitForSpeech( 20, "addition", "subtraction", "multiplication", "mix them up") 
if($response2 = "addition") 
ControlCommand("Script Manager", ScriptStart, "Inter Math Add")
sleep(90)
elseif($response2 = "subtraction")
ControlCommand("Script Manager", ScriptStart, "Inter math subt")
sleep(90)
elseif($response2 = "multiplication")
ControlCommand("Script Manager", ScriptStart, "inter math multi")
sleep(90)
elseif($response2 = "mix them up")
print( 1)
sleep(500)
endif

Edit

#2   — Edited

Disregard this note.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#3  

What you’re asking about are array variables. Which store multiple values in an indexed variable. 

This robot program episode will be useful to begin learning how to program: https://synthiam.com/Tutorials/Lesson/119