The ARC Script Manual.

R.)

Release (servoPort) Release a servo from holding its position Example: Release(D14)

ReleaseAll ( [boardIndex] ) Release all servos from holding their position BoardIndex is optional, and specified the EZ-B board to use Example: ReleaseAll()

REPEAT Repeats the code between REPEAT and ENDREPEAT as many times as specified. Assigns the number of times to the specified variable. Example: REPEAT($x, 0, 5, 1) Print(x= + $x) ENDREPEAT

REPEATUNTIL Repeats the code between REPEATUNTIL and ENDREPEATUNTIL until the specified condition is TRUE. Example: REPEATUNTIL($second = 30) Print(Second= + $second) Sleep(500) ENDREPEAT

REPEATWHILE Repeats the code between REPEATWHILE and ENDREPEATWHILE until the specified condition is FALSE. Example: REPEATUNTIL($second > 50) Print(Second= + $second) Sleep(500) ENDREPEAT

Return() Return from a Goto() If you jump to a position of code with a Goto(), the Return statement will allow you to return back to that piece of code following the last Goto() statement. If you attempt to Return() with an empty stack, nothing will happen. The script will ignore the Return() statement. Example: Return()

Reverse( [speed], [milliSeconds] ) Using a Movement Panel Control, this will start your robot in the Reverse direction. Optionally, you can provide the speed and/or number of milliseconds to move. You will require at least one Movement Panel to be configured within the project. This function will control that movement panel. Speed is a number between 0 and 255 Example: Reverse() Example: Reverse(200) Example: Reverse(255, 5000)

Right( [speed], [milliSeconds] ) Using a Movement Panel Control, this will turn your robot right. You will require at least one Movement Panel to be configured within the project. This function will control that movement panel. Optionally, you can specify the speed and/or number of milliseconds to turn. Speed is a number between 0 and 255 Example #1: Right() Example #2: Right(200) Example #2: Right(200, 5000)

RoboQuad( RoboQuadCommand ) Send a command to a RoboQuad connected on port D1 on EZ-B 0. Find the available RoboQuad commands further down in this document. Example: RoboQuad( Walk_Forward ) Example: RoboQuad( Left_Turn_Roll )

RoboSapien( RoboSapienCommand ) Send a command to a RoboSapien connected on port D1 on EZ-B 0. Find the available RoboSapien commands further down in this document. Example: RoboSapien( WalkForward ) Example: RoboSapien( LeftArmUp )

RollLeft( [milliSeconds] ) Using the servo port settings from a Movement Panel Control, this will roll your drone robot left Optionally, you can specify the number of milliseconds to turn. Example #1: RollLeft() Example #2: RollLeft(1000)

RollRight( [milliSeconds] ) Using the servo port settings from a Movement Panel Control, this will roll your drone robot right Optionally, you can specify the number of milliseconds to turn. Example #1: RollRight() Example #2: RollRight(1000)

Roomba( cmd ) Execute the specified command on a connected Roomba Vacuum on Port D0 and EZ-B 0. Look for the available Roomba commands further below in this document. You may also add the Roomba Movement Panel for graphical controls. Example: Roomba(init) Example: Roomba(SideBrushOn)

Round( value, decimals ) Returns the math Round() of a number Returns the number rounded to the specified decimal places Example: $x = Round($pi, 2) Example: $x = Round(9.3848291, 1)

References

RoboQuad Commands Supported on the EZ-B v3 only, the D1 port can be used to connect to the IR wire of some WowWee robots. Due to multiple hardware revisions of the robots, these functions are not always compatible and therefore this feature has been discontinued in the EZ-B v4. Stop Walk_Forward Right_Crab_Walk Left_Crab_Walk Left_Crab_Four_Steps Right_Crab_Four_Steps Backward_Four_Steps Walk_Backward Forward_Four_Steps Rotate_Counter_Clockwise Counter_Clockwise_Four_Steps Rotate_Clockwise Clockwise_Four_Steps Head_Up Head_Down Head_Clockwise Head_Counter_Clockwise Top_Left_Shuffle Top_Right_Shuffle Bottom_Left_Shuffle Bottom_Right_Shuffle Left_Strafe Right_Strafe Left_Turn_Roll Right_Turn_Roll Burst Single_Shot Stomp_Walk Left_Legs_In Left_Legs_Out Left_Forward_Leg_In Left_Forward_Leg_Out Left_Backward_Leg_In Left_Backward_Leg_Out Right_Legs_In Right_Legs_Out Right_Forward_Leg_In Right_Forward_Leg_Out Right_Backward_Leg_In Right_Backward_Leg_Out Program Play_Program Program_Delete_Last_Step Erase_Program Scan_Left_For_Object Scan_Right_For_Object Smart_Scan Approach_Nearest_Object Escape_Walk Toggle_Activity_Level_1 Toggle_Activity_Level_2 Toggle_Activity_Level_3 Toggle_Aggression_1 Toggle_Aggression_2 Toggle_Aggression_3 Toggle_Awareness_1 Toggle_Awareness_2 Toggle_Awareness_3 Leg_Reset Full_Reset Volume_Up Volume_Down Guard Sleep Toggle_Autonomy Toggle_Sensors Twitch Surprise Wave Dizzy Attack Roar Aware_Stance High_Stance Aggressive_Stance Dance_Demo Movement_Demo Leg_Check

RoboSapien Commands Supported on the EZ-B v3 only, the D1 port can be used to connect to the IR wire of some WowWee robots. Due to multiple hardware revisions of the robots, these functions are not always compatible and therefore this feature has been discontinued in the EZ-B v4.

TurnRight RightArmUp RightArmOut TiltBodyRight RightArmDown RightArmIn WalkForward WalkReverse TurnLeft LeftArmUp LeftArmOut TiltBodyLeft LeftArmDown LeftArmIn Stop WakeUp Burp RightHandStrike RightHandSweep RightHandStrike2 HighFive Fart LeftHandStrike LeftHandSweep Whistle Roar

Roomba Commands The iRobot Roomba can be controlled by the EZ-B. Once the Roomba Movement Panel has been added, these commands can be parameters to the Roomba() function. Syntax use for this function can be found above in this document. Init EnableSensors DisableSensors PowerOff SpotClean Clean MaxClean DisableAllBrushes MainBrushOn MainBrushOff SideBrushOn SideBrushOff VacuumOn VacuumOff SeekDockingStation

Roomba/Sound Music Notes The iRobot Roomba or EZ-B v4 can be told to play audio tones. They may be simple, but it is fun - here is a list of parameters for the RoombaTone() or SoundNote() functions. The syntax for the function can be found above in this document. Here are the acceptable notes C1 Db1 D1 Eb1 E1 F1 Gb1 G1 Ab1 A1 Bb1 B1 C2 Db2 D2 Eb2 E2 F2 Gb2 G2 Ab2 A2 Bb2

The notes below are not supported with iRobot Roomba and only works with EZ-B v4 SoundNote() C3 Db3 D3 Eb3 E3 F3 Gb3 G3 Ab3 A3 Bb3


ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.