All Commands

All EZ-Script Commands

Sleep (milliseconds)

· Pauses for specified milliseconds

· Example sleeps for 1 second: Sleep(1000)


SleepRandom (lowMilliSec, highMilliSec)

· Pauses for a random millisecond delay between the2 provided values

· Example: SleepRandom(1000, 5000)


Servo (servoPort, position)

· Move servo to the specified position

· Servo position is between 1 and 180

· Example: Servo(D14, 25)


SetServoMin (servoPort, position)

· Set the minimum limit that this servo can evermove to

· Servo position is between 1 and 180

· Example: Set ServoMin(D14, 40)


SetServoMax (servoPort, position)

· Set the maximum limit that this servo can evermove to

· Servo position is between 1 and 180

· Example: Set ServoMax(D14, 100)


PWM (digitalPort, speed)

· Set the PWM (Pulse Width Modulation) to thedesired duty percentage cycle

· This simulates voltage on the specified pin(Between 0 and 5v)

· PWM Value is between 0 and 100

· Example: PWM(D14, 90)


GetPWM (digitalPort)

· Gets the PWM (Pulse Width Modulation) ofspecified port

· PWM is between 0 and 100

· Example: $x = Get PWM(D14)


PWMRandom (digitalPort, lowSpeed, highSpeed)

· Set the PWM (Pulse Width Modulation) to a randompercentage duty cycle

· This simulates voltage on the specified pin(Between low and high percentage value, scaled between 0 and 5 volts)

· The value is between 0 and 100

· Example: PWMRandom(D14, 10, 90)


ServoSpeed (servoPort, speed)

· Set the speed of servo or PWM. This is the speedto move between positions.

· The servo speed is a number between 0 (fastest)and 10 (slowest)

· *Note: To initialize the ServoSpeed()
atfirst use, set a Servo() position before using the ServoSpeed()command. If there is no previous position (such as during power-on), thesoftware assumes the position is 0 and will cause issues with your robot.

· *Note: Once the ServoSpeed() has beeninitialized the first time, specify the ServoSpeed() before specifyingthe Servo() position.

· Example: ServoSpeed(D14, 25)


ServoSpeedRandom (servoPort, lowSpeed, highSpeed)

· Set the servo speed or PWM to a random value

· The servo speed is a number between 0 (fastest)and 10 (slowest)

· *Note: To initialize the ServoSpeed()
atfirst use, set a Servo() position before using the ServoSpeed()command. If there is no previous position (such as during power-on), thesoftware assumes the position is 0 and will cause issues with your robot.

· *Note: Once the ServoSpeed() has beeninitialized the first time, specify the ServoSpeed() before specifyingthe Servo() position.

· Example: ServoSpeedRandom(D14, 10, 20)


ServoUp (servoPort, count)

· Increment the servo position value by specifiedcount

· Servo position is between 1 and 180

· Example: ServoUp(D14, 1)


ServoDown (servoPort, count)

· Decrement the servo position value by specifiedcount

· Servo position is between 1 and 180

· Example: ServoDown(D14, 1)


ServoRandom (servoPort, lowPosition, highPosition)

· Move the servo to a random position between lowand high

· Servo position is between 1 and 180

· Example: ServoRandom(D14, 10, 20)


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-Bboard to use

· Example: ReleaseAll()


Move (servoPort, forward/stop/reverse)

· Set a modified servo to move

· Example: Move(D14, “forward”)


Set (digitalPort, on/off/true/false)

· Set a digital port state to either on or off

· Example: Set(D2, OFF)


SetRandom (digitalPort)

· Set a digital port to a random state of either onor off

· Example: SetRandom(D2)


ToggleDigital (digitalPort )

· Toggle the digital port

· Example: ToggleDigital(D2)


Digital_Wait (digitalPort, on/off/true/false, [delay ms])

· Wait until the digital port status has changed

· The optional parameter Delay MS is themillisecond delay for checking. This value determines the delay between checks.

· Example: Digital_Wait(D12, ON)

· Example: Digital_Wait(D12, ON, 50)


ADC_Wait (adcPort, higher/lower/equals, value, [delay ms])

· Wait until ADC port is higher or lower thanspecified value

· The optional parameter Delay MS is themillisecond delay for checking. This value determines the delay between checks.

· Example: ADC_Wait(ADC0, HIGHER, 50)

· Example: ADC_Wait(ADC0, HIGHER, 50, 50)


ADC_Wait_Between (adcPort, low, high, [delay ms])

· Wait (pauses script) until ADC port is betweenthe specified values. Soon as the ADC port is between the low and high values,it will stop waiting.

· The optional parameter Delay MS is themillisecond delay for checking. This value determines the delay between checks.

· Example: ADC_Wait_Between(ADC0, 20, 50)

· Example: ADC_Wait_Between(ADC0, 20, 50, 50)


Movement_Wait ( forward/reverse/stop/left/right )

· Wait until a movement from the movement panel isspecified.

· Even if another script executes a movement, thiswill execute

· Example: Movement_Wait(“FORWARD”)


Servo_Wait ( digitalPort, higher/lower/equals, value )

· Wait until the Servo Port is higher or lower thanspecified value.

· Zero can be specified as a value for a stoppedservo.

· Example: Servo_Wait(D5, HIGHER, 20)


WaitForServoMove (servoPort, [timeout MS])

· Waits for the specified servo to move.

· Unlike Servo_Wait, this function does not waitfor a specific value. It simply returns once the servo has moved to a newposition.

· Optionally, the timeout parameter will stopwaiting after the specified number of milliseconds.

· Example: WaitForServoMove(d0)

· Example: WaitForServoMove(d0, 1000)


Ping_Wait (triggerPort, echoPort, higher/lower/equals,distance)

· Wait until the Ping Sensor distance is higher orlower than specified distance value.

· Trigger and Echo are Digital Ports

· Example: Ping_Wait(D3, D4, HIGHER, 50)


Forward( [speed], [milliSeconds] )

· Using a Movement Panel Control, this will startyour robot in the Forward direction.

· Optionally, you can provide the speed and/ornumber of milliseconds to move.

· You will require at least one movement panel tobe configured within the project. This function will control that movementpanel.

· Speed is a number between 0 and 255

· Example: Forward()

· Example: Forward(200)

· Example: Forward(255, 5000)



Reverse( [speed], [milliSeconds] )

· Using a Movement Panel Control, this will startyour robot in the Reverse direction.

· Optionally, you can provide the speed and/ornumber of milliseconds to move.

· You will require at least one movement panel tobe configured within the project. This function will control that movementpanel.

· Speed is a number between 0 and 255

· Example: Reverse()

· Example: Reverse(200)

· Example: Reverse(255, 5000)



Stop()

· Using Movement Panel Control, this will stop yourrobot.

· You will require at least one movement panel tobe configured within the project. This function will control a movement panel.

· Example: Stop()



Left( [speed], [milliSeconds] )

· Using a Movement Panel Control, this will turnyour robot left.

· You will require at least one movement panel tobe configured within the project. This function will control that movementpanel.

· Optionally, you can specify the speed and/ornumber of milliseconds to turn.

· Speed is a number between 0 and 255

· Example #1: Left()

· Example #2: Left(200)

· Example #2: Left(200, 5000)



Right( [speed], [milliSeconds] )

· Using a Movement Panel Control, this will turnyour robot right.

· You will require at least one movement panel tobe configured within the project. This function will control that movementpanel.

· Optionally, you can specify the speed and/ornumber of milliseconds to turn.

· Speed is a number between 0 and 255

· Example #1: Right()

· Example #2: Right(200)

· Example #2: Right(200, 5000)



Up( [milliSeconds] )

· Using the servo port settings from a MovementPanel Control, this will raise your drone robot up

· Optionally, you can specify the number ofmilliseconds to turn.

· Example #1: Up()

· Example #2: Up(1000)


Down( [milliSeconds] )

· Using the servo port settings from a MovementPanel Control, this will lower your drone robot up

· Optionally, you can specify the number ofmilliseconds to turn.

· Example #1: Down()

· Example #2: Down(1000)



RollRight( [milliSeconds] )

· Using the servo port settings from a MovementPanel Control, this will roll your drone robot right

· Optionally, you can specify the number ofmilliseconds to turn.

· Example #1: RollRight()

· Example #2: RollRight(1000)


RollLeft( [milliSeconds] )

· Using the servo port settings from a MovementPanel Control, this will roll your drone robot left

· Optionally, you can specify the number ofmilliseconds to turn.

· Example #1: RollLeft()

· Example #2: RollLeft(1000)



Land()

· Tell your flying drone to land

· Example: Land()



TakeOff()

· Tell your flying drone to take off

· Example: TakeOff()


DroneEmergency()

· Tell your flying drone to reset from emergency orpower down when flying.

· This command should be added a button on thejoystick so you may stop the drone so it does not get away or in danger.


SayEZB( text to speech, [ezb index] )

· Speaks the text that is specified within thebrackets out of the EZ-B v4 speaker in the background. This command does notblock, the script will continue to execute.

· Optionally, the EZB index to speak out can beadded as the second parameter. This can be empty as well. The value is between0 and 4.

· Example: SayEZB(\"Hello, I am a robot”)

· Example: SayEZB(Speaking out of second EZB”,1)


SaySSMLEZB( ssml to speech, [ezb index] )

· Speaks the formatted SSML that is specified within thebrackets out of the EZ-B v4 speaker in the background. This command does notblock, the script will continue to execute.

· Optionally, the EZB index to speak out can beadded as the second parameter. This can be empty as well. The value is between0 and 4.


SayEZBWait( text to speech, [ezb index] )

· Speaks the text that is specified within thebrackets out of the EZ-B v4 speaker and blocks until done speaking.

· Optionally, the EZB index to speak out can beadded as the second parameter. This can be empty as well. The value is between0 and 4.

· Example: SayEZBWait(\"Hello, I am arobot\")

· Example: SayEZBWait(Speaking out of secondEZB”, 1)



SaySSMLEZBWait( ssml to speech, [ezb index] )

· Speaks the formatted SSML text that is specified within thebrackets out of the EZ-B v4 speaker and blocks until done speaking.

· Optionally, the EZB index to speak out can beadded as the second parameter. This can be empty as well. The value is between0 and 4.



StopEZBAudio()

· Stops any audio background that is being streamedthrough the EZ-B v4

· Example: StopEZBAudio()


Say( text to speech )

· Speaks the text that is specified within thebrackets out of the PC Sound Card in the background. This command does notblock, the script will continue to execute.

· Example: Say(\"Hello, I am a robot\")



SaySSML( ssml to speech )

· Speaks the formatted SSML that is specified within thebrackets out of the PC Sound Card in the background. This command does notblock, the script will continue to execute.



SayWait( text to speech )

· Speaks the text that is specified within thebrackets out of the PC Sound Card and blocks until done speaking.

· Example: SayWait(\"Hello, I am arobot\")



SaySSMLWait( ssml to speech )

· Speaks the formatted SSML text that is specified within thebrackets out of the PC Sound Card and blocks until done speaking.



SpeakStop( )

· Stops speaking the current specified phrases outof the PC Sound Card.

· Example: SpeakStop()



SpeakRSS( url, [story index] )

· Speaks the title and text of the rss url out ofthe PC Sound Card.

· Example #1: SpeakRSS(\"http://rss.cbc.ca/lineup/world.xml\")

· Example #2: SpeakRSS(\"http://rss.cbc.ca/lineup/world.xml\",3)



SpeakRSSDescription( url, [story index] )

· Speaks only the text of the rss url out of the PCSound Card.

· Example #1: SpeakRSSDescription(\"http://rss.cbc.ca/lineup/world.xml\")

· Example #2: SpeakRSSDescription(\"http://rss.cbc.ca/lineup/world.xml\",3)



SpeakTwitter( twitterUserName, [story index] )

· Speaks the twitter feed for the specific usernameout of the PC Sound Card.

· Example #1: SpeakTwitter(\"EZ_Robot\")

· Example #2: SpeakTwitter(\"EZ_Robot\",3)



SpeakVolume( value )

· The volume of the speech synthesizer out of thePC Sound Card.

· The value is between 0 and 100

· Example: SpeakVolume(30)



I2CClockSpeed( boardIndex, rate )

· Specify the clock speed of the i2c interface. Thedefault speed is 100000, which is 100khz.

· Many devices support faster speeds, up to 400000(400khz).

· Example: I2CClockSpeed(0, 100000)

· Example: I2CClockSpeed(0, 400000)



I2CWrite( boardIndex, deviceAddress, data, .... )

· Send a series of ASCII data to the specifieddevice hex address over the i2c interface.

· This command will Start i2c, Write Data, and Stopi2c.

· boardIndex is the EZ-B you wish to use (0 isfirst EZ-B)

· Device Hex Address of i2c device must be in 0x00format.

· Data can be Hex (0x09), string (\"string\"),or decimal (188)

· Example: I2CWrite(0, 0x09, 0x02, 0x05, 0x06)

· Example: I2CWrite(0, 0x09, 244)

· Example: I2CWrite(0, 0x09, \"This is text“ + $variable)



I2CWriteBinary( boardIndex, deviceAddress, variable )

· Send a series of binary data to the specifieddevice hex address over the i2c interface from the provided variable array.

· This command will Start i2c, Write Data, and Stopi2c.

· boardIndex is the EZ-B you wish to use (0 isfirst EZ-B)

· Device Hex Address of i2c device must be in 0x00format.

· Variable is an array with data that you wish tosend

· Example: I2CWriteBinary(0, 0x09, $variable)



I2CRead( boardIndex, 7bitDeviceAddress, bytes to expect )

· Returns a series of ASCII data from the specifiedaddress over the i2c interface

· boardIndex is the EZ-B you wish to use (0 isfirst EZ-B)

· Device Hex Address must be hexadecimal 7Bit(0x5e)

· You must specify the number of Bytes To Expect

· Example: $Val = I2CRead(0, 0x5e, 2)


I2CReadBinary( boardIndex, 7bitDeviceAddress, bytes to expect,variable )

· Returns a series of binary data from thespecified address over the i2c interface into the specified variable array

· boardIndex is the EZ-B you wish to use (0 isfirst EZ-B)

· Device Hex Address must be hexadecimal 7Bit(0x5e)

· You must specify the number of Bytes To Expect

· Example: I2CReadBinary(0, 0x5e, 2, $variable)



SendSerial( digitalPort, baudRate, data, ... )

· Send a series of data over the specified port andbaud rate

· Data can be Hex (0x09), string (\"string\"),or decimal (188)

· Example: SendSerial(d0, 9600, 0x00, 0x04,0x05)

· Example: SendSerial(d0, 9600, 244, 200, “a”)

· Example: SendSerial(d0, 9600, \"This istext\")

· Example: SendSerial(d0, 9600, “Hello “ +$name)


SendUDP( hostname, port, data, ... )

· Send a series of UDP data over the specified portto the hostname

· Data can be Hex (0x09), string (\"string\"),or decimal (188)

· Example: SendUDP(“192.168.0.1”, 21, “HelloWorld”)

· Example: SendUDP(“192.168.0.1”, 21, 0x20,0x21, 0x22, 0x30)

· Example: SendUDP(“192.168.0.1”, 21, 0x20,0x21, 0x22, “Hello”)

· Example: SendUDP(“192.168.0.1”, 21, 0x20,0x21, 0x22, 0x30, $x)


UARTInit( boardIndex, port, baudRate )

· Initialize the Peripheral UART on the EZ-B v4with the specified baud rate. The UART will stay initialized until the EZ-B v4is power cycled, and therefore this command only needs to be called once.

· The Board Index is the EZ-B index starting at 0.

· The port can be 0, 1 or 2.

· The baud rate can be between 1 and 3750000 bps.The UART receive buffers on the EZ-B v4 are 5,000 bytes.

· Look near at the UART Port section lower in thisdocument for the EZ-B Pin’s associated with each UART Port.

· Example: UARTInit(0, 0, 9600 )


UARTAvailable( boardIndex, port )

· Receive the count of bytes available in thePeripheral UART Receive Buffer of the EZ-B v4. The UART receive buffers on theEZ-B v4 are 5,000 bytes.

· The Board Index is the EZ-B index starting at 0.

· The port can be 0, 1 or 2.

· Look near at the UART Port section lower in thisdocument for the EZ-B Pin’s associated with each UART Port.

· Example: UARTAvailable(0, 0)


UARTRead( boardIndex, port, numBytes )

· Receive ASCII bytes from the Peripheral UARTReceive Buffer of the EZ-B v4. The UART receive buffers on the EZ-B v4 are5,000 bytes.

· To know how many bytes are available, use theUARTAvailable() function.

· The Board Index is the EZ-B index starting at 0.

· The port can be 0, 1 or 2.

· Look near at the UART Port section lower in thisdocument for the EZ-B Pin’s associated with each UART Port.

· Example: UARTRead(0, 0, 10)

· Example: UARTRead(0, 0, UARTAvailable(0, 1))


UARTReadBinary( boardIndex, port, numBytes, variable )

· Receive binary bytes from the Peripheral UARTReceive Buffer of the EZ-B v4 into the variable as an array. The UART receivebuffers on the EZ-B v4 are 5,000 bytes.

· To know how many bytes are available, use theUARTAvailable() function.

· The Board Index is the EZ-B index starting at 0.

· The port can be 0, 1 or 2.

· Look near at the UART Port section lower in thisdocument for the EZ-B Pin’s associated with each UART Port.

· Example: UARTReadBinary(0, 0, 10, $variable)

· Example: UARTReadBinary(0, 0, UARTAvailable(0,1), $variable)


UARTReadAvailable( boardIndex, port )

· Receive all available ASCII bytes from thePeripheral UART Receive Buffer of the EZ-B v4. The UART receive buffers on theEZ-B v4 are 5,000 bytes.

· The Board Index is the EZ-B index starting at 0.

· The port can be 0, 1 or 2.

· Look near at the UART Port section lower in thisdocument for the EZ-B Pin’s associated with each UART Port.

· Example: UARTReadAvailable(0, 0)

· Example: UARTReadAvailable(0, 0)


UARTWrite( boardIndex, port, data )

· Write ASCII data through the Peripheral UART.

· The Board Index is the EZ-B index starting at 0.

· The port can be 0, 1 or 2.

· Look near at the UART Port section lower in thisdocument for the EZ-B Pin’s associated with each UART Port.

· Example: UARTWrite(0, 0, “hello world” )

· Example: UARTWrite(0, 0, 0x30, 0x40, “hello” )


UARTWriteBinary( boardIndex, port, variable )

· Write binary variable array data through thePeripheral UART.

· The Board Index is the EZ-B index starting at 0.

· The port can be 0, 1 or 2.

· Look near at the UART Port section lower in thisdocument for the EZ-B Pin’s associated with each UART Port.

· Example: UARTWriteBinary(0, 0, $variable )


WaitUntilTime( hour, minute )

· Waits until the specified time. The script willstop at this command and not continue until the specified time. The time isdeclared in 24 hour format.

· Example: WaitUntilTime(17, 30)


MP3TriggerPlayTrack( digitalPort, baud, trackNumber, [pause time] )

· Plays the specified MP3 track from the MP3Trigger Sheild

· Optionally, the Pause Time value can be usedwhich disables the Speech Recognition control for the specified number ofmilliseconds.

· Example: MP3TriggerPlayTrack( d0, 38400, 1 )

· Example: MP3TriggerPlayTrack( d0, 38400, 1,3000 )



MP3TriggerVolume( digitalPort, baud, volume )

· Set the volume of the mp3 trigger between 0 and255. 0 is louded, 255 is quiet.

· Example: MP3TriggerVolume( d0, 38400, 20 )


MP3TriggerPlayRandomTrack( digitalPort, baud, lowestTrackNum,highestTrackNum )

· Plays a random MP3 track from the MP3 TriggerSheild between the supplied track numbers

· Example: MP3TriggerPlayRandomTrack( d0, 38400,1, 10 )


MP3TriggerNext( digitalPort, baud )

· Plays the next MP3 track from the MP3 TriggerSheild

· Example: MP3TriggerPlayNext( d0, 38400 )


MP3TriggerPrev( digitalPort, baud )

· Plays the previous MP3 track from the MP3 TriggerSheild

· Example: MP3TriggerPrevious( d0, 38400 )


MP3TriggerStop( digitalPort, baud )

· Stops the current MP3 track from the MP3 TriggerSheild

· Example: MP3TriggerStop( d0, 38400 )


ControlCommand( windowName, ControlCommandParameter, [values] )

· Sends a command to the window by its name. Viewall available ControlCommand() parameters for each control when editing ascript by pressing the Cheat Sheet tab. The Cheat Sheet tab islocated to the right of the script editor in ARC. Pressing Cheat Sheettab will display a list of all available parameters for each control. Simplyclick on the parameter and it will insert into your code.

· Some commands require an additional parameter.When editing EZ-Script, check the Cheat Sheet tab to view all availablecommands for the controls within your project.

· This command has a shorthand alias which is “CC”(See examples below).

· Example: ControlCommand( \"ADCGraph\", pauseOn )

· Example: ControlCommand(\"SoundBoard\", Track_3 )

· Example: ControlCommand( \"Camera\",CameraTweet, \"This is an Image Description\" )

· Example: ControlCommand( \"ScriptManager\", ScriptStart, \"MyScript\" )

· Example: ControlCommand( \"SpeechRecognition\", PauseMS, 3000)

· Example: cc(“Auto Position”, AutoPositionAction,“Action Name”)

· Example: cc(“Auto Position”,AutoPositionFrame, “Frame Name”)

· Example: cc(“Auto Position”,AutoPositionFrame, “Frame Name”, 50, 3)

· Example: cc(“Speech Recognition”, PauseMS, 2000)



GetControlValue( windowName, ControlCommandValues )

· Gets a value from the window by its name. Lookfurther down in this document for available control command parameters underthe ControlCommand Values section.

· Example: $x = GetControlValue ( \"ADC Graph\",“pause” )


# Commented Text

· Comment a line of code

· Example: # This is a comment. This code willnot run


:Label

· Defines a label for a GOTO() command

· Example: :My_Label


Goto( label )

· Goto a specific :Label location

· Example: Goto(My_Label)


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 codefollowing 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()


If (Value Condition Value )

· IF condition can support multiple comparisons andfunctions.

· Condition tree must be closed with an ENDIF

· See the Functions section of this document.

· Condition can be =, <, >, <=, >=, !=,AND, OR

· Example:

If(GetDigital(D0) = 1)

Print(“One”)

EndIf

· Example:

If ($Day = 2 AND $Hour = 3)

Print(“Hello”)

EndIf

· Example:

If (GetServo(D5) >20 OR ($x >= 3 and $y < 2))

Print(“Yup!”)

EndIf


ElseIf (Value Condition Value )

· ElseIF condition can support multiple comparisonsand functions.

· Condition tree must be closed with an ENDIF

· See the Functions section of this document.

· Condition can be =, <, >, <=, >=, !=,AND, OR

· Example:

If (GetServo(D0) = 1)

Print(“One”)

ElseIf (GetServo(D0) = 2)

Print(“Two”)

Else

Print(“Something Else”)

EndIf


Else

· Condition tree must be closed with an ENDIF

· Example:

If (GetDigital(D0) = 1)

Print(“Yes”)

Else

Print(“No”)

EndIf


REPEAT( variable, start, end, increment )

· Repeats the code between REPEAT and ENDREPEAT asmany times as specified. Assigns the number of times to the specified variable.This is similar to a FOR statement.

· Example:

REPEAT($x, 0, 5, 1)

Print(“x=” + $x)

ENDREPEAT



REPEATUNTIL( condition )

· Repeats the code between REPEATUNTIL andENDREPEATUNTIL until the specified condition is TRUE.

· Example:

REPEATUNTIL($second = 30)

Print(“Second=” + $second)

Sleep(500)

ENDREPEAT


REPEATWHILE( condition )

· Repeats the code between REPEATWHILE andENDREPEATWHILE until the specified condition is FALSE.

· Example:

REPEATUNTIL($second > 50)

Print(“Second=” + $second)

Sleep(500)

ENDREPEAT


GetServo( Port )

· Returns the last specified Servo Position valueof the servo port.

· Servo position is between 1 and 180

· Example: $x = GetServo(d0)


GetServoRealtime( Port )

· For uart servos which accept bi-directionalcommunication (i.e. Dynamixel, LewanSoul). This will query the servo and returnthe current position.

· Example: $x = GetServoRealtime(d0)


GetServoSpeed( Port )

· Returns the Servo Speed value of the specifiedport

· Speed is between 0 and 10

· Example: $x = GetServoSpeed(d0)


SetSpeed( speed, [speedRight] )

· Sets the global Movement Speed value

· If you specify only one parameter, the speed ofboth the left and right wheel will be modified

· If you specify two parameters, the firstparameter is the speed of the Left wheel and second parameter is the speed ofthe Right wheel.

· The speed can be viewed in the Script VariableViewer

· Speed is between 0 (slow) and 255 (fast)

· Example: SetSpeed(50)

· Example: SetSpeed(50, 100)


SetSpeedLeft( speed )

· Sets the global Movement Speed value of the Leftwheel

· Speed is between 0 (slow) and 255 (fast)

· The speed can be viewed in the Script VariableViewer

· Example: SetSpeedLeft(50)


SetSpeedRight( speed )

· Sets the global Movement Speed value of the Rightwheel

· Speed is between 0 (slow) and 255 (fast)

· The speed can be viewed in the Script VariableViewer

· Example: SetSpeedRight(50)



GetSpeed( )

· Returns the global Movement Speed value

· Speed is between 0 and 255

· The speed can be viewed in the Script VariableViewer

· Example: $x = GetSpeed()


GetSpeedLeft( )

· Returns the global Movement Speed value of Leftwheel

· Speed is between 0 and 255

· The speed can be viewed in the Script VariableViewer

· Example: $x = GetSpeedLeft()


GetSpeedRight( )

· Returns the global Movement Speed value of Rightwheel

· Speed is between 0 and 255

· The speed can be viewed in the Script VariableViewer

· Example: $x = GetSpeedRight()


GetCPUTemp( [ezb index] )

· Returns the CPU Temperature of the EZ-B v4

· Optionally, you can pass a parameter for theindex of the ezb you wish to receive the value from, starting at index 0.

· Example: $x = GetCPUTemp()


GetVoltage( [ ezb index] )

· Returns the EZ-B v4 Battery Voltage

· Optionally, you can pass a parameter for theindex of the ezb you wish to receive the value from, starting at index 0.

· Example: $x = GetVoltage()


GetADC( Port )

· Returns the 8 Bit ADC value of the specified port

· Example: $x = GetADC(adc0)


GetADC12( Port )

· Returns the 12 Bit ADC value of the specifiedport on the EZ-B v4

· Example: $x = GetADC12(adc0)


GetRandom( Min, Max )

· Returns a random number between Min and Max

· Example: $x = GetRandom(10, 50)


GetRandomUnique( Min, Max )

· Returns a random number between Min and Max

· This function attempts to make the number uniquefrom the last time it was called

· Example: $x = GetRandomUnique(10, 50)


GetDigital( Port )

· Returns the Digital value of the specified portas a 0 or 1

· Example: $x = GetDigital(d0)


ASin( value )

· Returns the math ASin() function (also calledArcSin)

· Example: $x = ASin(27)


ACos( value )

· Returns the math ACos() function (also called ArcCos)

· Example: $x = Acos(27)


Sqrt( value )

· Returns the math Square Root function

· Example: $x = Sqrt(9)


Map( input, inputMin, inputMax, containerMin, containerMax )

· Returns a scaled value of input between containerMinand containerMax. Specify the known input’s minimum and maximum values,and the known container (output) values. For example, if you were to scale avalue between -1 and 1 to 0 and 180, enter this, which returns 135.

· Example: $x = Map(0.5, -1, 1, 0, 180)



Power( value, power )

· Returns the math Power() function

· First parameter is the input value

· The second parameter is the power

· Example: $x = Power(2, 4)


Sin( value )

· Returns the math SIN() function

· Example: $x = Sin(27)


Cos( value )

· Returns the math COS() function

· Example: $x = Cos(27)


Abs( value )

· Returns the absolute value of a number

· Converts a negative into a positive number

· Example: $x = Abs(-22)


Round( value, decimals )

· Returns the math Round() of a number

· Returns the number rounded to the specifieddecimal places

· Example: $x = Round($pi, 2)

· Example: $x = Round(9.3848291, 1)


GetPing( trigger port, echo port )

· Return the Ping HC-SR04 value of the specifiedport

· Example: $x = GetPing(d0, d1)


Tweet( message )

· Send a Twitter message using the configuredTwitter account. Configure your Twitter account under File->TwitterSettings.

· Example: Tweet(\"I Love EZ-Robot!\")

· You may also use the ControlCommand to Tweetimages with text from a Camera Control.

· Example: ControlCommand( \"Camera\",CameraTweet, \"Our New Image\" )


HTTPGet( url )

· Send an HTTP Get command to the provided addressand return the contents

· Example: HTTPGet(\"http://192.168.0.10/decoder_control.cgi?command=35&onestep=5&user=admin&pwd=admin\")

·Example: $temp = HTTPGet(\"<http://192.168.0.15/GetTemperature.cgi>\")


SoundNote( note, lengthMS, [signal type] )

· Plays the specified audio note out of the EZ-B v4speaker for the specified number of milliseconds. The sound notes are listed inthis document further down.

· Optionally, you may provide a signal type aswell. The valid signal types are Sine, Square, Triangle, Pulse, Sawtooth,WhiteNoise, GaussNoise, DigitalNoise.

· Example: SoundNote( “C2”, 1000)

· Example: SoundNote( “C2”, 1000, “Square”)


Halt()

· Exit the current running script.

· Example: Halt()


Print( txt )

· Outputs the specified text to the debug console

· Example: Print(“This is some text”)

· Example: Print(“Today is $Day”)

· Example: Print(“$pi rounded is Round($pi, 2)”)


PrintHex( txt )

· Outputs the hex values of the specified variableto the debug console

· Example: PrintHex($myVariable)



Exec( EXE/Bat File, [parameters] )

· Executes a windows application or batch file. Thesecond parameter is a list of optional parameters

· Example: Exec(“C:\\Windows\otepad.exe”)

· Example: Exec(“C:\\Windows\otepad.exe”,“C:\\MyFile.txt”)


Browser( url )

· Launches the default web browser with thespecified URL.

· Example: Browser(“http://www.google.com”)



FileDelete( filename )

· Deletes a file on your computer

· Example: FileDelete(“c:\\temp\\mylog.txt”)



FileWrite( filename, contents )

· Appends text to the specified file. This does notappend a new line.

· Example: FileWrite(“c:\\temp\\mylog.txt”, “MyVariable: “ + $x)

· Example: FileWrite(“c:\\temp\\mylog.txt”, “ServoPosition: GetServo(d2)”)


FileWriteLine( filename, contents )

· Appends text as a new line to the specified file.

· Example: FileWriteLine(“c:\\temp\\mylog.txt”,“My Variable: “ + $x)

· Example: FileWriteLine(“c:\\temp\\mylog.txt”,“Servo Position: GetServo(d2)”)



FileReadClose( filename )

· Closes the file from reading.

· This must call must be performed before writingto the file. Once you begin reading from the file, the file is OPEN. Closingthe file will reset to the start once you begin reading again.

· Example: FileReadClose(“c:\\temp\\mylog.txt”)



FileReadReset( filename )

· Resets the file to the beginning.

· If you read to the end of a file, this functionmust be called to reset reading from the beginning of the file.

· Example: FileReadReset(“c:\\temp\\mylog.txt”)



FileExists( filename )

· Returns a 1 or 0 if the specified file exists.

· Example: $fileExists =FileExists(“c:\\temp\\mylog.txt”)



FileReadEnd( filename )

· Returns a 1 or 0 if the file has reached the end.

· Example: $fileEnd =FileReadEnd(“c:\\temp\\mylog.txt”)



FileReadChar( filename )

· Returns the next character in the specified file

· Example: $char =FileReadChar(“c:\\temp\\mylog.txt”)



FileReadLine( filename )

· Returns the next line of the specified filename.

· Example: $line =FileReadLine(“c:\\temp\\mylog.txt”)



FileReadAll( filename )

· Returns the entire contents of the specifiedfile.

· Example: $contents =FileReadAll(“c:\\temp\\mylog.txt”)



FileReadLineRandom( filename )

· Returns a random line within the specified file

· Example: $randomLine = FileReadLineRandom(“c:\\temp\\mylog.txt”)



Split( text, splitChar, index )

· Splits a string by the specified SplitChar intoan array and returns the value at the specified index.

· The Index is zero based, which means 0 (zero) isthe first item within the array.

· Example: $contents = Split(“One, Two, Three”,“,”, 1)

· Example: $contents = Split(“One – Two -Three”, “-”, 2)



WaitForChange( value, [timeout MS] )

· Pauses the execution of a script until thespecified value has changed.

· Optionally, the timeout parameter will stopwaiting after the specified number of milliseconds.

· Example: WaitForChange($x)

· Example: WaitForChange(GetServo(d0))

· Example: WaitForChange(GetDigital(d0))

· Example: WaitForChange(GetDigital(d0), 1000)



WaitFor( expression, [timeout MS] )

· Pauses the execution of a script until the specifiedexpression is true.

· Optionally, the timeout parameter will stopwaiting after the specified number of milliseconds.

· Example: WaitFor($AutoPositionStatus = 0)

· Example: WaitFor($value1 = $value2)

· Example: WaitFor($value1 = $value2, 1000)


Length( value )

· Returns the length of the specified variable orstring in characters/bytes.

· Example: $len = Length(“This string is 33characters long”)



GetCharAt( value, index )

· There are two methods to obtain a characterwithin a string. This method, which is GetCharAt(), or using the [] squarebrackets. See the example below.

· Returns the character at the specified index.

· If the character at the specified position isoutside of readable ASCII, you will want to use GetByteAt() or GetByte()functions instead.

· The Index is zero based, which means 0 (zero) isthe first character.

· Example: $char = GetCharAt(“Hello World”, 2)

· Example: $char = GetCharAt($x, 2)

· Example: $byte = $x[3]

· Example: $byte = $x[$y]


GetByteAt( value, index )

· Returns the ASCII Ordinal value of the byte atthe specified location within the array.

· If the byte is 0x05, this function will return aninteger value of 53. Use this function to convert data read by i2c into ordinalvalues.

· The Index is zero based, which means 0 (zero) isthe first character.

· Example: $value = GetByteAt(“Hello World”, 2)

· Example: $value = GetByteAt($x, 2)


GetByte( value )

· Returns the ASCII Ordinal value of a byte or bytearray.

· Technically, this function returns a number andnot specifically a byte.

· The number of bytes in the variable willdetermine the size of the integer returned. If one byte is passed, an 8 bitnumber is returned. If two bytes are passed, a 16 bit number is returned. If 4bytes are passed, a 32 bit number is returned. If 6 bytes are passed, a 64 bitnumber is returned.

· If the variable contains 0x37, this function willreturn an integer value of 53. Use this function to convert data read by i2cinto ordinal values.

· Example: $value = GetByte(“H”)

· Example: $value = GetByte($x)


GetAsByte( value )

· Returns the byte of the integer or firstcharacter of string.

· If you pass 75 as the value, you will get theASCII value of the letter K

· Example: $value = GetAsByte(“H”)

· Example: $value = GetAsByte($x)


ClearVariables( )

· Clear all variables. Variables are not clearedbetween projects. You may wish to call this function in your initializationscript – unless your project is using variables from another previous project.

· Example: ClearVariables()


ClearVariable( variableName )

· Clear specified variable data and removes it frommemory. The variable must be within quotes.

· Example: ClearVariable(“$MyVariable”)



AppendArray( variable, value )

· Appends the value to an existing array. Thisgrows the size/length of the array to hold the new value.

· Example: AppendArray($myArray, 10)

· Example: AppendArray($myArray, “banana”)


DefineArray( variable, size, [default value] )

· Creates an array of the variable to the specifiedsize.

· Optionally, you may also pass a value that willbe used for the default values.

· Example: DefineArray($myArray, 10)

· Example: DefineArray($myArray, 10, 2)


FillArray( variable, default value)

· Fill an existing array with the default value.

· Example: FillArray($myArray, 88)

· Example: FillArray($myArray, “default value”)


GetArraySize( variable )

· Returns the size of the specified array variable.

·
*Note: The variable passed as a parameter must be in quotations. See theexample below.

· Example: $x = GetArraySize(“$myArray”)


Sort( variable, [ascending | descending] )

· Sorts the contents of the array by eitherAscending or Descending direction.

· Example: Sort( $MyArray, Ascending )


Count( variable, textToCount )

· Returns the instance number of TextToCount withina variable string..

· Example: $apples = Count(“apple apple appleapple, “apple”)


DumpVariables( )

· Prints a list of all variables and theirrespective values separated by CRLF.

· This is used for the TCP Server clients whichrequire a collection of variables.

· Example: DumpVariables()


IsNumeric( value )

· Returns True or False if the specified value isnumeric.

· Example: $value = IsNumeric($x)


WaitForSpeech( timeOut Seconds, phrases )

· Pauses and waits for one of the specified phrasesto be spoken.

· Returns the phrase that was spoken in lowercase.

· Will return “timeout” if no word is detected inthe specified timeout length.

· Example: WaitForSpeech(30, “Yes”, “No”)

· Example: $value = WaitForSpeech(30, “Yes”,“No”)


Contains( string1, string2 )

· Returns TRUE or FALSE if string2 is found withinstring1.

· This search is case insensitive.

· Example: $value = Contains(“Cat In The Hat”,“Cat”)



IndexOf( string1, string2 )

· Returns the first occurrence index of string2within string1.

· This search is case insensitive.

· Example: $value = IndexOf(“Cat In The Hat”, “In”)



SubString( string1, start, length )

· Returns the specified substring within string1.

· Example: $value = SubString(“Cat In The Hat”,4, 2)



PlayAudio( filename )

· Plays the specified audio file to the defaultaudio device

· File formats can be MP3 or WAV

· Example: PlayAudio(“c:\\temp\\my Audio.mp3”)



StopAudio()

· Stops the current audio file that is playingthrough the default audio device by PlayAudio()

· Example: StopAudio()



IsConnected( boardIndex )

· Returns TRUE or FALSE if the specified EZ-B boardindex is connected

· Example: $status = IsConnected(0)



ToString( value )

· Converts the parameter into a string by strippingunreadable characters

· Example: $string = ToString($hexData)



Min( value1, value2 )

· Returns the lower of the two values specified.

· Example: $lowest = Min(3, 5)



Max( value1, value2 )

· Returns the higher of the two values specified.

· Example: $highest = Min(3, 5)



ToHex( value )

· Converts the integer parameter into a readablehex value string. This will convert the integer 56 into the string “0x39”.Great for debugging byte data received from i2c interface.

· Example: $hex = ToString($hexData)



SetBits( bit7, bit6, bit5, bit4, bit3, bit2, bit1, bit0 )

· Returns the value of each bit of a byte. Returnsa decimal number byte of the bits. This is a useful function for i2ccommunication because many of the i2c devices use bits.

· Example: $val = SetBits(1, 0, 0, 0, 0, 0, 0,0)

· Example: $val = SetBits(true, false, false,false, false, false, false, false)



ToBinaryString( value )

· Displays the specified value in its binaryrepresentation

· Example: $str = ToBinaryString( 254 )



GetBit( value, bit )

· Returns the value of the specified bit. The LSBis bit 0, and MSB is bit 7.

· Example: $bit = GetBit(255, 1)



Pause( )

· Pauses the script at the location where it iscalled. To resume the script, another script must call the ControlCommand’sResume function. Otherwise, the script can be stopped by pressing the Stopbutton on the control.

· Example: Pause()



ComOpen( Port, Baud Rate )

· Open the specified serial communication port onthe local PC. When opened, this will also begin buffering incoming data whichcan be read. The input buffer is 128KB.

· Example: ComOpen(“com1”, 9600)



ComClose( Port )

· Close the specified serial communication port onthe local PC.

· Example: ComClose(“com1”)



ComWrite( Port, String )

· Write the string to the specified serialcommunication port on the local PC. The port must be open before this commandcan be called.

· Example: ComWrite(“com1”, “this is data”)

· Example: ComWrite(“com1”, $variable)



ComWriteLine( Port, String )

· Write the string as a new line to the specifiedserial communication port on the local PC. The port must be open before thiscommand can be called.

· Example: ComWriteLine(“com1”, “This is aline”)

· Example: ComWriteLine(“com1”, $variable)



ComReadLine( Port )

· Read all string data up to a newline from theinput buffer of the specified serial communication port on the local PC. Theport must be open before this command can be called.

· Example: $variable = ComReadLine(“com1”)


ComReadAll( Port )

· Read all available string data from the inputbuffer of the specified serial communication port on the local PC. The portmust be open before this command can be called.

· Example: $variable = ComReadAll(“com1”)


ComAvailable ( Port )

· Returns the number of bytes/characters in theinput buffer of the specified serial communication port on the local PC. Theport must be open before this command can be called.

· Example: $size = ComAvailable(“com1”)


ComRead( Port, Bytes to Read )

· Read specified number of characters from theinput buffer of the specified serial communication port on the local PC. Theport must be open before this command can be called.

· Example: $variable = ComRead(“com1”, 15)



ComClearInput( Port )

· Clear the input buffer. The port must be openbefore this command can be called.

· Example: ComClearInput(“com1”)


ComWriteBinary( Port, Array )

· Write the array of data to the specified serialcommunication port on the local PC. The port must be open before this commandcan be called.

· Example: ComWriteBinary(“com1”,$arrayVariable)


ComReadBinary( Port, Bytes to Read, Array )

· Read specified number of byes from the inputbuffer of the specified serial communication port on the local PC. The datawill be stored in the specified array. The array will be created automaticallyand sized to the incoming data. The port must be open before this command canbe called.

· Example: ComReadBinary(“com1”, 10,$arrayVariable)


PushVar( NameSpace, Cell, Value )

· Send the value to the EZ-Cloud.

· Example: PushVar(“DJ Sures”, “test”, “I amtesting”)


PullVar( NameSpace, Cell )

· Retrieve the value from the EZ-Cloud.

· Example: $x = PullVar(“DJ Sures”, “test”)


ShowControl( ControlName )

· Used for mobile devices and the Interface Builderonly, this command will open the specified control into the foreground.

· Example: ShowControl(“Wii Remote”)


CloseControl( )

· Used for mobile devices and the Interface Builderonly, this command will close the current control, the same as pressing theBACK button on your device.

· Example: CloseControl()



ShowDesktop( desktopNumber )

· Shows the specified virtual desktop. The desktopnumber is 1, 2 or 3.

· Example: ShowDesktop(1)


SetVolume( volume, [ezb index] )

· Sets the volume of the EZ-B v4 speaker

· The volume can be a value between 0 (quite), 100(loud), 200 (2x over drive)

· The current volume value can be viewed in theScript Variable Monitor

· Optionally, the index of the EZ-B may bespecified

· Example: SetVolume(50)

· Example: SetVolume(100, 1)


GetVolume()

· Gets the volume of the EZ-B v4 speaker

· The volume will be a value between 0 (quite), 100(loud), 200 (2x over drive)

· The volume can be viewed in the Script VariableViewer

· Example: $x = GetVolume(50)


SleepPC( Suspend|Hibernate, force, wake )

· Sends a command to the operating system to sleepor hibernate.

· If Force is TRUE, the computer is forced to sleepand other applications have no say in the decision.

· If Wake is TRUE, the computer will wake up onWake events.

· Example: SleepPC( Suspend, true, true )

· Example: SleepPC( Hibernate, true, true )


LoadProject( filename )

· Loads the specified project and replaces theexisting project.

· Established connections will be maintained.OnConnect scripts within the Connection Control will be executed if aconnection is already established.

· If no path is specified, this command searchesfor the file in the default My Documents\\ARCfolder.

· If no extension is provided, the .ezbdefault extension is assumed.

· For obvious reasons, no further commandsfollowing LoadProject() are executed.

· Example: LoadProject(“MyTest”)

· Example: LoadProject(“MyTest.ezb”)

· Example: LoadProject(“C:\\Temp\\MyTest.ezb”)



CheckForUpdate()

· Checks the EZ-Robot server if there is a newerversion of ARC available.

· This requires an internet connection.

· Example: $x = CheckForUpdate()




References


Multiple EZ-B Boards

ARC supports multiple physical EZ-B Boards connected to your computer.You can specify the board by putting the board number in front of the port. Forexample: Servo(2.d0, 8) will move the D0 servo on EZ-B board #2 toposition 8. If no board index is specified, the first board (zero) is assumed.If using more than one board, the first board is always responsible formovement panels.


ADC Ports

The ADC Ports are labeled on the EZ-B as A0 to A7. They are AnalogInput ports, which read the voltage of the incoming data between 0 and 5 volts.Consult the Learn Section of our website for more information on Port Types.

· ADC0

· ADC1

· ADC2

· ADC3

· ADC4

· ADC5

· ADC6

· ADC7


Virtual Servo Ports

The Virtual Servo Ports do not actually control any physical hardware.You will find the Virtual Servo Ports in any control that uses a servo. Thesecan be used in exchange of using variables for storing servo positions, orusing servo controls.

· V0

· V1

· V2

· V3

· V4

· V5

· V6

· V7

· V8

· V9

· V10

· V11

· V12

· V13

· V14

· V15

· V16

· V17

· V18

· V19



Servo/Digital Ports

These ports are used to turn on and off devices with voltage. Thedigital ports can also be used for detecting if the input voltage is in an Onor Off state. For output, the digital ports may control servos, transmit PWM(Pulse Width Modulation) and send serial data. Consult the Learn Section of ourwebsite for more information on the different modes of Digital Port Types.

· D0

· D1

· D2

· D3

· D4

· D5

· D6

· D7

· D8

· D9

· D10

· D11

· D12

· D13

· D14

· D15

· D16

· D17

· D18

· D19

· D20

· D21

· D22

· D23


UART Ports

The UARTx ports are used connect to Serial TTL devices for both inputand output. Contrary to the digital port Serial Output, these peripherals willalso receive data into an input buffer as well. The input buffer of each UARTis 5,000 Bytes. There are 3 UARTs, the first is the hardware labelled port,second and third are digital pins. These UARTs are controlled using theUARTInit(), UARTWrite(), UARTRead() and UARTAvailable() commands. The speed ofthese UARTs can be any integer between 1 and 3750000 bps.

· UART0 TX:Expansion Connector

· UART0 RX:Expansion Connector

· UART1 TX: D5

· UART1 RX: D6

· UART2 TX: D18

· UART2 RX: D19


Digital Port Outout Baud Rates

The digital ports can output Serial, which differs from the UART.Using any digital port as a Serial Output command can be done by using theSendSerial() command. Using a digital port this way does not include an inputbuffer. For input buffers, use the UARTx functions.

· 300

· 1200

· 2400

· 4800

· 9600

· 19200

· 38400

· 57600

· 115200


ControlCommand Values

You can receive values for controls using using the GetControlValue()command. The syntax for this command can be found above in this document. Eachcontrol will accept a different collection of commands, which are listed here.


All Controls

· Pause


Variable Types

Variables are global throughout the entire ARC environment. TheVariable Watcher Control allows you to watch variable values in real-time.Variable types are dynamic by assignment, meaning there is no specific typedefinition between String, Integer and Floating point.

Examples:

· String: $str = “This is a string”

· String Concat: $str = “fu” + $bar

· Integer: $number = 6

· Floating Point: $dec = 3.14

· Byte: $byte = 0x52

· Boolan: $bool = true

· Result Condition: $result = ($x > $y)

· Increment numeric: $number++

· Decrement numeric: $number—

· Binary Shift Left: $x = 123 << 1

· Binary Shift Right: $x = 123 >> 1



Scientific Math Functions

· Sin()

· Cos()

· Tan()

· Sec()

· Csc()

· Cot()

· ASin()

· ACos()

· ATan()

· SinH()

· CosH()

· TanH()

· Abs()

· Sqrt()

· Ciel()

· Floor()

· Exp()

· Log10()

· Log()

· Max()

· Min()

· Round()

· E()

· Pi()

· Now()

· Today()


DateTime Functions

· MinDate( date1,date2 )

· MaxDate( date1,date2 )

· MonthName(monthNumber )

· AddDays( date,days )

· AddMonths(date, days)

· AddYears( date,years )

· AddHours( date,hours )

· AddMinutes(date, minutes )

· AddSeconds(date, seconds )

· TotalHours(date )

· TotalMinutes(date )

· TotalSeconds(date )

· FmtTimeSpan(value, format)

· Get number format from https://msdn.microsoft.com/en-us/library/ee372287.aspx

· Example:

· $hours = FmtTimeSpan(CDateTime(\"10/29/20161:00:00 PM\") - CDateTime(\"10/28/2016 2:02:02 PM\"),\"hh\")

· FmtNum( value,format)

· Get number format from https://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx

· FmtDate( value,format)

· Get date format from https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx


Casting Functions

These functions are to cast objects from one datatype to another

· To Double:CDBL()

· To Integer:CInt()

· To Long:CLong()

· To UnsignedInteger: CUint()

· To UnsignedLong: CULong()

· To DateTime:CDateTime()


Variable Constants/Reserved Words

These variables are read-only reserved words and cannot be assigned.

· $direction

· $date

· $month

· $year

· $day

· $dayName

· $hour

· $minute

· $second

· $monthName

· $time

· $pi


Sound Music Notes

The EZ-B v4 can be told to play audio tones. They may be simple, butit is fun – here is a list of parameters for the SoundNote() functions. Thesyntax for the function can be found above in this document. Here are theacceptable notes…

· C1

· Db1

· D1

· Eb1

· E1

· F1

· Gb1

· G1

· Ab1

· A1

· Bb1

· B1

· C2

· Db2

· D2

· Eb2

· E2

· F2

· Gb2

· G2

· Ab2

· A2

· Bb2

· C3

· Db3

· D3

· Eb3

· E3

· F3

· Gb3

· G3

· Ab3

· A3

· Bb3