# memberdef

refid: aec9d2d673d4d9b59a2bd8010735f043a
name: rSend
definition: void rSend
type: void
argsstring: (char message[], int numberOfBytes, int echo, int sensor_echo, char *commandText)
detaileddescription:
send bytes to the Scribbler
@param message        the command/data to be sent
@param numberOfBytes  how many bytes to transmit
@param echo           whether or not (1/0) the Scribbler echoes the command
@param sensor_echo    whether or not the Scribbler sends all sensor data
                      back after echoing the command


refid: a4901ef3dec54104759bfd75571bbc36a
name: write_JPEG_file
definition: void write_JPEG_file
type: void
argsstring: (Picture pic, int i_height, int i_width, FILE *outfile, int quality)
detaileddescription:
Convert a 2 dimensional array of JSAMPLE into a JPEG file
@param i_buffer  array of JSAMPLE 
@param i_height  the hieght of the image
@param i_width   the width of the image
@param outfile   opened file for writing JPEG compression object
@param quality   a measure of quality of the output image from 0 to 100

@pre             i_buffer consists of sets of 3 consecutive JSAMPLEs, each being one pixel,
                 or an array of image_width * image_height pixel structs

@credit          this is a slightly modified version of write_JPEG_file(char *, int)
                 from example.c from the libjpeg.v8d library directory.


refid: a503776d14ebce86dd82c413ca3db984f
name: rSetOpeningExchange
definition: void rSetOpeningExchange
type: void
argsstring: (char onOff)
detaileddescription:
@param onOff      char 'y' enables beeps (default)
                  char 'n' disables beeps 
                  other character values ignored

briefdescription:
Turn on and off opening exchange with robot, including
                  distinctive beeps when connecting 
                  retrieval of robot name.


refid: aadfc48e2707da0e4f1f01e6aa14b6ef4
name: rConnect
definition: int rConnect
type: int
argsstring: (const char *address)
briefdescription: connects program to Scribbler
detaileddescription:
connects program to Scribbler
@param address  string, giving name of workstation port
                or a Scribbler Bluetooth designation

                several string formats are possible
                a communications port, such as "/dev/rfcomm0"
                a MAC address, such as "00:1E:19:01:0E:13"
                a Scribbler 2 fluke serial number, such as "245787"
                a full IPRE serial number, such as "IPRE245787"
                a Fluke 2 serial number (hexadecimal), such as "021F"
                a full Fluke 2 serial number, such as "Fluke2-021F"

@return         the socket number of communications port

@post           subsequent communications will take place through
                this socket, unless changed by rSetConnection


refid: a3c53b72530db178106d17242b205a196
name: rSetConnection
definition: void rSetConnection
type: void
argsstring: (int new_socket_num)
briefdescription: set current connection to the socket number
detaileddescription:
set current connection to the socket number
@param new_socket_num  the number of an open socket for communication
@pre                   new_socket_num has been returned by rConnect
                       the designated socket has not been closed


refid: aa46e349ecd38fc90f8d7cea9bb8678d6
name: rBeep
definition: void rBeep
type: void
argsstring: (double duration, int frequency)
briefdescription: Beeps with the given duration and frequency.
detaileddescription:
Beeps with the given duration and frequency
@param duration   length of note in seconds
@param frequency  frequency of pitch in cycles per second (hertz)
@pre              duration > 0.0


refid: a37ccc278b3ecca6290debf1929d1e479
name: rBeep2
definition: void rBeep2
type: void
argsstring: (double duration, int freq1, int freq2)
briefdescription: Generates two notes for the prescribed duration.
detaileddescription:
Generates two notes for the prescribed duration
@param duration  length of note in seconds
@param freq1     frequency of first pitch in cycles per second (hertz)
@param freq2     frequency of second pitch in cycles per second (hertz)
@pre             duration > 0.0


refid: ab6f8b6b28334162e70f7cf3a3b165e4b
name: rSetName
definition: void rSetName
type: void
argsstring: (const char *name)
briefdescription: Change name stored in the robot to the 16-byte name given.
detaileddescription:
Change name stored in the robot to the 16-byte name given
@param name  specifies new name of robot
             if < 16 bytes given, name is filled with null characters
             if >= 16 bytes given, name is truncated to 15 bytes plus null


refid: a881bb425d86ebb8caacd6be66c2f8a37
name: rGetName
definition: const char* rGetName
type: const char *
argsstring: ()
briefdescription: Get the name of the robot.
detaileddescription:
@return information about the name of the robot
@post  the returned name is a newly-allocated 17-byte string


refid: a3753b86dcb4de002e8456501ca35edae
name: rSetForwardness
definition: void rSetForwardness
type: void
argsstring: (char *direction)
briefdescription: specifies which end of the Scribbler is considered the front
detaileddescription:
specifies which end of the Scribbler is considered the front
@param direction  identifies front direction
@pre              direction is either "fluke-forward" or "scribbler-forward"
                  (not case sensitive)


refid: a21581ded1f409300e8f63f4c41c2f2f0
name: rSetLEDFront
definition: void rSetLEDFront
type: void
argsstring: (int led)
briefdescription: Set the front [fluke] LED on or off.
detaileddescription:
Set the front [fluke] LED on or off
@param led  value 1 turns on LED
            value 0 turns off LED
@pre        led must be 0 or 1


refid: a2466176fa2332b88e5013d6b3fe9ceb8
name: rSetLEDBack
definition: void rSetLEDBack
type: void
argsstring: (double led)
briefdescription: Set the the intensity of the back fluke LED,.
detaileddescription:
Set the the intensity of the back fluke LED,
@param led  intensity of the LED
            values between 0 and 1 provide a range of brightness
            from off to full intensity
            values bigger than 1 are treated as 1 (full brightness)
            values less than 0 are treated as 0 (LED off).


refid: a80896cdb3ff63acd1fa0a5ce97ba7c9d
name: rGetBattery
definition: double rGetBattery
type: double
argsstring: ()
briefdescription: Get the percentage of volts left in the batteries of the scribbler.
detaileddescription:
Get the percentage of volts left in the batteries of the scribbler
@warning may not return useful values
@return  percentage of battery voltage


refid: a9296f6acbac4ef59cfc6cb0dc535c60f
name: rGetStall
definition: int rGetStall
type: int
argsstring: (int sampleSize)
detaileddescription:
Determine if robot has stalled
Since readings of each brightness sensor can vary substantially,
  each sensor can be queried sampleSize times and an average obtained.
@param sampleSize  how many readings are taken for each sensor
@pre               sampleSize > 0
@return            whether or not robot current has stalled
@post              Returns 1 if the robot has stalled
                   Returns 0 otherwise.

briefdescription:
Determine if robot has stalled
Since readings of each brightness sensor can vary substantially,
  each sensor can be queried sampleSize times and an average obtained.


refid: ac7c83fef113af1c3612ce59c03417e8b
name: rSetBluetoothEcho
definition: void rSetBluetoothEcho
type: void
argsstring: (char onOff)
detaileddescription:
@param onOff      char 'y' enables echoing
                  char 'n' disables echoing
                  other character values ignored

briefdescription:
Turn on and off echoing of Bluetooth transmissions
All robot commands involve the transmission of a command over Bluetooth
  Scribbler commands are always 9 bytes
  Fluke commands have varying lengths
The fluke echos most, but not all, of the commands
For many commands, the fluke also echos 11 bytes of sensor data.


refid: a9006ba8c581c7543d7d460d76c06d077
name: rGetLightsAll
definition: void rGetLightsAll
type: void
argsstring: (int lightSensors[3], int sampleSize)
detaileddescription:
Get the average values of each of the three light sensors in an array.
Values of each light sensor can somewhat (typically under 5%-10%).
To even out variability, the sensor can be queried sampleSize times
and an average obtained.
@param lightSensors  array to store intensity values
@param sampleSize   how many readings are taken for each sensor
@pre                space already allocated for lightSensors array
                    sampleSize > 0
@post  
                    lightSensors[0] gives average value for left sensor
                    lightSensors[1] gives average value for middle sensor
                    lightSensors[2] gives average value for right sensor
                    Intensity values near 0 represent bright light
                    Intensities may extend to about 65000 for a very dark region.

briefdescription:
Get the average values of each of the three light sensors in an array.
Values of each light sensor can somewhat (typically under 5%-10%).
To even out variability, the sensor can be queried sampleSize times
and an average obtained.


refid: aaba34be55fd5db7d8c1ed08ea7caa6c2
name: rGetLightTxt
definition: int rGetLightTxt
type: int
argsstring: (const char *sensorName, int sampleSize)
detaileddescription:
Get the average values of a specified light sensor.
Values of each light sensor can vary somewhat (typically under 5%-10%).
To even out variability, the sensor can be queried sampleSize times
and an average obtained.
@param sensorName   name of the light sensor
@pre                sensorName is "left", "center", "middle", or "right"
                    (not case sensitive)
                    designations "center" and "middle" are alternatives
                    for the same light sensor
@param sampleSize   how many readings are taken for the sensor
@pre                sampleSize > 0
@return             reading from the specified light sensor, averaged
                    over sampleSize number of data samples
                    if sensorName invalid, returns -1.0

briefdescription:
Get the average values of a specified light sensor.
Values of each light sensor can somewhat (typically under 5%-10%).
To even out variability, the sensor can be queried sampleSize times
and an average obtained.


refid: ab4bf6868424a63a95a85decea8a93fc2
name: rGetIRAll
definition: void rGetIRAll
type: void
argsstring: (int irSensors[2], int sampleSize)
detaileddescription:
Get an array of true/false values regarding the presence of an obstacle,
based on the average values of each of the three IR sensors.
Since readings of each light sensor can vary substantially,
   each sensor can be queried sampleSize times and an average obtained.
@param irSensors   array to store intensity values
@param sampleSize  how many readings are taken for each sensor
@pre               space already allocated for irSensors array
                   sampleSize > 0
@post  
                   irSensors[0] checks obstacle for left sensor
                   irSensors[1] checks obstacle for right sensor
@post              for each irSensors array value
                   return 0 indicates no obstacle detected
                   return 1 indicates obstacle detected  

briefdescription:
Get an array of true/false values regarding the presence of obstacle
based on the average values of each of the three IR sensors.
Since readings of each light sensor can vary substantially,
   each sensor can be queried sampleSize times and an average obtained.


refid: afdf7579ce632c07de1d90f27d67abff7
name: rGetIRTxt
definition: int rGetIRTxt
type: int
argsstring: (const char *sensorName, int sampleSize)
detaileddescription:
Use specified IR sensor to determine if obstacle is present.
Since values of each light sensor can vary substantially,
the sensor can be queried sampleSize times and an average obtained.
@param sensorName   name of the light sensor
@pre                sensorName is "left" or "right"
                    (not case sensitive)
@param sampleSize   how many readings are taken for the sensor
@pre                sampleSize > 0
@return             true/false (0/1) determination of obstacle, based on IR
                    sensorName sensor, averaged over sampleSize number of
                    data samples
@post               return 0 indicates no obstacle detected
                    return 1 indicates obstacle detected

briefdescription:
Use specified IR sensor to determine if obstacle is present.
Since values of each light sensor can vary substantially,
the sensor can be queried sampleSize times and an average obtained.


refid: a7fc13d53088ba239a95c99b46b9607e8
name: rGetLine
definition: void rGetLine
type: void
argsstring: (int lineSensors[2], int sampleSize)
detaileddescription:
Use Scribbler 2 line sensors of Scribbler to check for a black line
on a white surface under the robot.
Since values of each light sensor can vary substantially,
   the sensor can be queried sampleSize times and an average obtained.
@warning            results of these sensors may be flakey!
@param lineSensors  array to store line values detected
@param sampleSize   how many readings are taken for each sensor
@pre                space already allocated for lineSensors array
                    sampleSize > 0
@post               lineSensors[0] checks left sensor for line
                    lineSensors[1] checks right sensor for line
@post               for each irSensors array value
                    return 0 indicates line is identified
                    return 1 indicates line is not identified

briefdescription:
Use Scribbler 2 line sensors of Scribbler to check for a black line
on a white surface under the robot.
Since values of each light sensor can vary substantially,
   the sensor can be queried sampleSize times and an average obtained.


refid: ab319898f4ab7d48f15e1215db8e5b4ba
name: rSetIRPower
definition: void rSetIRPower
type: void
argsstring: (int power)
briefdescription: Set the amount of power for the dongle's IR sensors.
detaileddescription:
Set the amount of power for the dongle's IR sensors
@param power  the desired power level for the IR sensors
@pre          power is between 0 and 255 (inclusive)


refid: a3a47f1f85c9fa6d68b5ebd8c0ad2e484
name: rGetObstacleAll
definition: void rGetObstacleAll
type: void
argsstring: (int obstSensors[3], int sampleSize)
detaileddescription:
Get the average values of the three obstacle sensors in an array.
Since readings of each obstacle sensor can vary substantially (successive
     readings may differ by several hundred or more),
     each sensor can be queried sampleSize times and an average obtained.
@param obstSensors   array to store intensity values
@param sampleSize    how many readings are taken for each sensor
@pre                 space already allocated for obstSensors array
                     sampleSize > 0
@post                obstSensors[0] gives average value for left sensor
                     obstSensors[1] gives average value for middle sensor
                     obstSensors[2] gives average value for right sensor
                     Obstacle values near 0 represent no obstacle is seen
                     Obstacle values may approach 6000 as obstacle gets close.
@warning             As battery degrades, sensor readings degrade,
                     yielding systematically lower numbers.

briefdescription:
Get the average values of the three obstacle sensors in an array.
Since readings of each obstacle sensor can vary substantially (successive
     readings may differ by several hundred or more),
     each sensor can be queried sampleSize times and an average obtained.


refid: a5853bf9f106b47ed0e767adf8fab0d0b
name: rGetObstacleTxt
definition: int rGetObstacleTxt
type: int
argsstring: (const char *sensorName, int sampleSize)
detaileddescription:
Get the average values of a specified obstacle (IR) sensor.
Since values of each obstacle sensor can vary substantially (successive
     readings may differ by several hundred or more),
     the sensor can be queried sampleSize times and an average obtained.
@param sensorName  name of the obstacle sensor
@pre               sensorName is "left", "center", "middle", or "right"
                   (not case sensitive)
                   designations "center" and "middle" are alternatives
                   for the same light sensor
@param sampleSize  how many readings are taken for the sensor
@pre               space already allocated for vals array
                   sampleSize > 0
@return            reading from the specified obstacle sensor, averaged
                   over sampleSize number of data samples
                   Obstacle values near 0 represent no obstacle is seen
                   Obstacle values may approach 6000 as obstacle gets close.
@warning           As battery degrades, sensor values degrade,
                   yielding systematically lower numbers.

briefdescription:
Get the average values of a specified obstacle (IR) sensor.
Since values of each obstacle sensor can vary substantially (successive
     readings may differ by several hundred or more),
     the sensor can be queried sampleSize times and an average obtained.


refid: a98820d670fcacb6780e68a58a4bc0a8a
name: rGetBrightAll
definition: void rGetBrightAll
type: void
argsstring: (int brightSensors[3], int sampleSize)
detaileddescription:
Read the Fluke's virtual light sensors.
 Since readings of each brightness sensor can vary substantially (successive
    readings may differ by 5000-10000),
    each sensor can be queried sampleSize times and an average obtained.
@param brightSensors  array to store intensity values
@param sampleSize     how many readings are taken for each sensor
@pre                  space already allocated for brightSensors array
                      sampleSize > 0
@post                 brightSensors[0] gives average value for left sensor
                      brightSensors[1] gives average value for middle sensor
                      brightSensors[2] gives average value for right sensor
                      Brightness values near 0 represent bright light
                      Brightness values may extend to about 65535 for a very dark region.

briefdescription:
Read the Fluke's virtual light sensors.
 Since readings of each brightness sensor can vary substantially (successive
    readings may differ by 5000-10000),
    each sensor can be queried sampleSize times and an average obtained.


refid: a6c898c1c12957822fbd0e2b68f573c4d
name: rGetBrightTxt
definition: int rGetBrightTxt
type: int
argsstring: (char *sensorName, int sampleSize)
detaileddescription:
Reads one of the Fluke's virtual light sensors.
Since values of each obstacle sensor can vary substantially (successive
   readings may differ by 5000-10000),
   the sensor can be queried sampleSize times and an average obtained.
@param sensorName  name of the obstacle sensor
@pre               sensorName is "left", "center", "middle", or "right"
                   (not case sensitive)
                   designations "center" and "middle" are alternatives
                   for the same light sensor
@param sampleSize  how many readings are taken for the sensor
@pre               sampleSize > 0
@return            reading from the specified obstacle sensor, averaged
                   over sampleSize number of data samples
                   Brightness values near 0 represent bright light
                   Brightness values may extend to about 65535 for a very dark region.

briefdescription:
Reads one of the Fluke's virtual light sensors.
Since values of each obstacle sensor can vary substantially (successive
   readings may differ by 5000-10000),
   the sensor can be queried sampleSize times and an average obtained.


refid: a1e10a9735a4b8dc8c79100905c30ecab
name: rGetInfo
definition: void rGetInfo
type: void
argsstring: (char *infoBuffer)
detaileddescription:
returns information about the robot's dongle, firmware, and 
communication mode as a 60 character array in infoBuffer. 
@param infoBuffer  a pre-defined, 60-character array 
@post              infoBuffer contains relevant robot information

briefdescription:
returns information about the robot's dongle, firmware, and 
communication mode as a 60 character array in infoBuffer.


refid: a1b2462eb7a3149a89cfe73f39339ed89
name: rTurnLeft
definition: void rTurnLeft
type: void
argsstring: (double speed, double time)
briefdescription: turn Scribbler left for a specified time and speed
detaileddescription:
turn Scribbler left for a specified time and speed
@param speed  the rate at which the robot should move left
              linear range:  -1.0 specifies right turn at full speed
                             0.0 specifies no turn
                             1.0 specifies left turn at full speed
@param time   specifies the duration of the turn
              if negative:    robot continues to turn until given another
                              motion command or disconnected (non-blocking)
              if nonnegative: robot turns for the given duration, in seconds


refid: a0c3496dd17992e9788110c15c017e566
name: rTurnRight
definition: void rTurnRight
type: void
argsstring: (double speed, double time)
briefdescription: turn Scribbler right for a specified time and speed
detaileddescription:
turn Scribbler right for a specified time and speed  
 @param speed  the rate at which the robot should move right
               linear range: -1.0 specifies left turn at full speed
                             0.0 specifies no turn
                             1.0 specifies right turn at full speed
 @param time   specifies the duration of the turn
               if negative:    robot continues to turn until given another
                               motion command or disconnected (non-blocking)
               if nonnegative: robot turns for the given duration, in seconds


refid: aa1a97cc92ee785afb8af4e248d08cbb9
name: rTurnSpeed
definition: void rTurnSpeed
type: void
argsstring: (char *direction, double speed, double time)
briefdescription: turn Scribbler in direction for a specified time and speed
detaileddescription:
turn Scribbler in direction for a specified time and speed
@param direction  direction of turn, based on looking from
                  the center of the robot and facing forward
@param speed      the rate at which the robot should move forward
                  linear range:  -1.0 specifies turn at full speed
                                 0.0 specifies no turn
                                 1.0 specifies turn at full speed
@param time       specifies the duration of the turn
                  if negative: robot continues to turn until given another
                               motion command or disconnected
                  if nonnegative: robot turns for the given duration, in seconds
@pre              direction is "left" or "right", case insensitive


refid: aaf2b57e29c053c7e3901ec5ee3cb047d
name: rForward
definition: void rForward
type: void
argsstring: (double speed, double time)
briefdescription: moves Scribbler forward for a specified time and speed
detaileddescription:
moves Scribbler forward for a specified time and speed
@param speed   the rate at which the robot should move forward
               linear range:  -1.0 specifies move backward at full speed
                              0.0 specifies no forward/backward movement
                              1.0 specifies move forward at full speed
@param time    specifies the duration of movement
               if negative:    robot continues to move forward until given another
                               motion command or disconnected (non-blocking)
               if nonnegative: robot moves forward for the given duration, in
                               seconds


refid: af55f107794f40ee2f77dd6817ad1453f
name: rFastForward
definition: void rFastForward
type: void
argsstring: (double time)
briefdescription: moves Scribbler forward at the largest possible speed for a specified time
detaileddescription:
moves Scribbler forward at the largest possible speed for a specified time 
@param time  specifies the duration of movement
             if negative: robot continues to move forward until given another
                          motion command or disconnected (non-blocking)
             if nonnegative: robot moves forward for the given duration, in
                             seconds
@warning     may take longer than usual to execute


refid: aa5544de8b24ee7917bcb1ba695071459
name: rBackward
definition: void rBackward
type: void
argsstring: (double speed, double time)
briefdescription: moves Scribbler backward for a specified time and speed
detaileddescription:
moves Scribbler backward for a specified time and speed  
@param speed  the rate at which the robot should move backward
              linear range:  -1.0 specifies move forward at full speed
                             0.0 specifies no forward/backward movement
                             1.0 specifies move backward at full speed
@param time   specifies the duration of the turn
              if negative: robot continues to go backward until given another
                           motion command or disconnected (non-blocking)
              if nonnegative: robot moves backward for the given duration, in
                              seconds


refid: a6712dd6e8442e19ff28158adeaf7c0d0
name: rMotors
definition: void rMotors
type: void
argsstring: (double leftSpeed, double rightSpeed)
detaileddescription:
move robot with given speeds for the left and right motors
continues until given another motion command or disconnected (non-blocking)
@param leftSpeed  the rate at which the left wheel should turn
             linear range:  -1.0 specifies move backward at full speed
                             0.0 specifies no forward/backward movement
                             1.0 specifies move forwardward at full speed
@param rightSpeed  the rate at which the right wheel should turn
             linear range:  -1.0 specifies move backward at full speed
                             0.0 specifies no forward/backward movement
                             1.0 specifies move forward at full speed

briefdescription:
move robot with given speeds for the left and right motors
continues until given another motion command or disconnected (non-blocking)


refid: aae5f14b4e6e28456e3a563b027052c02
name: rSavePicture
definition: void rSavePicture
type: void
argsstring: (Picture pic, char *filename)
briefdescription: Save a Picture to a .jpeg.
detaileddescription:
Save a Picture to a .jpeg
@param pic      RGB picture struct from Scribbler 2 camera
@param filename the name of the file
@pre            filename ends with .jpeg or .jpg.
@post           If the file does not exist, a new file will be created.
@post           If the file exists, the file will be overwritten.


refid: a22bed206f3ae7563a116be255e91906e
name: rLoadPicture
definition: Picture rLoadPicture
type: Picture
argsstring: (char *filename)
briefdescription: Load a picture from a .jpeg file.
detaileddescription:
Load a picture from a .jpeg file.
@param filename  the name of the file
@pre             file must exist
@pre             file must be a 256x192 .jpeg or .jpg
@return          Picture


refid: aef27262c15e206579736b5fca76b00c9
name: rDisplayPicture
definition: void rDisplayPicture
type: void
argsstring: (Picture pic, double duration, const char *windowTitle)
briefdescription: Display a picture in a new window.
detaileddescription:
Display a picture in a new window
@param pic         RGB picture struct from Scribbler 2 camera
@param duration    if duration > 0, operation is blocking
                   if duration <= 0, operation is non-blocking
                   for duration != 0, picture displayed for abs(duration) 
                           seconds or until picture closed manually
                   if duration == 0, picture displayed until closed manually
@param windowTitle The title of the window that appears.
                   white spaces will be replaced with underscores. 
@pre               windowTitle is less than 100 characters. 


refid: aadfc48e2707da0e4f1f01e6aa14b6ef4
name: rConnect
definition: int rConnect
type: int
argsstring: (const char *address)
briefdescription: connects program to Scribbler
detaileddescription:
@param address  string, giving name of workstation port
                or a Scribbler Bluetooth designation

                several string formats are possible
                a communications port, such as "/dev/rfcomm0"
                a MAC address, such as "00:1E:19:01:0E:13"
                a Scribbler 2 fluke serial number, such as "245787"
                a full IPRE serial number, such as "IPRE245787"
                a Fluke 2 serial number (hexadecimal), such as "021F"
                a full Fluke 2 serial number, such as "Fluke2-021F"

@return         the socket number of communications port

@post           subsequent communications will take place through
                this socket, unless changed by rSetConnection

connects program to Scribbler
@param address  string, giving name of workstation port
                or a Scribbler Bluetooth designation

                several string formats are possible
                a communications port, such as "/dev/rfcomm0"
                a MAC address, such as "00:1E:19:01:0E:13"
                a Scribbler 2 fluke serial number, such as "245787"
                a full IPRE serial number, such as "IPRE245787"
                a Fluke 2 serial number (hexadecimal), such as "021F"
                a full Fluke 2 serial number, such as "Fluke2-021F"

@return         the socket number of communications port

@post           subsequent communications will take place through
                this socket, unless changed by rSetConnection


refid: a3c53b72530db178106d17242b205a196
name: rSetConnection
definition: void rSetConnection
type: void
argsstring: (int new_socket_num)
briefdescription: set current connection to the socket number
detaileddescription:
@param new_socket_num  the number of an open socket for communication
@pre                   new_socket_num has been returned by rConnect
                       the designated socket has not been closed

set current connection to the socket number
@param new_socket_num  the number of an open socket for communication
@pre                   new_socket_num has been returned by rConnect
                       the designated socket has not been closed


refid: aa46e349ecd38fc90f8d7cea9bb8678d6
name: rBeep
definition: void rBeep
type: void
argsstring: (double duration, int frequency)
briefdescription: Beeps with the given duration and frequency.
detaileddescription:
@param duration   length of note in seconds
@param frequency  frequency of pitch in cycles per second (hertz)
@pre              duration > 0.0

Beeps with the given duration and frequency
@param duration   length of note in seconds
@param frequency  frequency of pitch in cycles per second (hertz)
@pre              duration > 0.0


refid: a37ccc278b3ecca6290debf1929d1e479
name: rBeep2
definition: void rBeep2
type: void
argsstring: (double duration, int freq1, int freq2)
briefdescription: Generates two notes for the prescribed duration.
detaileddescription:
@param duration  length of note in seconds
@param freq1     frequency of first pitch in cycles per second (hertz)
@param freq2     frequency of second pitch in cycles per second (hertz)
@pre             duration > 0.0

Generates two notes for the prescribed duration
@param duration  length of note in seconds
@param freq1     frequency of first pitch in cycles per second (hertz)
@param freq2     frequency of second pitch in cycles per second (hertz)
@pre             duration > 0.0


refid: ab6f8b6b28334162e70f7cf3a3b165e4b
name: rSetName
definition: void rSetName
type: void
argsstring: (const char *name)
briefdescription: Change name stored in the robot to the 16-byte name given.
detaileddescription:
@param name  specifies new name of robot
             if < 16 bytes given, name is filled with null characters
             if >= 16 bytes given, name is truncated to 15 bytes plus null

Change name stored in the robot to the 16-byte name given
@param name  specifies new name of robot
             if < 16 bytes given, name is filled with null characters
             if >= 16 bytes given, name is truncated to 15 bytes plus null


refid: a3753b86dcb4de002e8456501ca35edae
name: rSetForwardness
definition: void rSetForwardness
type: void
argsstring: (char *direction)
briefdescription: specifies which end of the Scribbler is considered the front
detaileddescription:
@param direction  identifies front direction
@pre              direction is either "fluke-forward" or "scribbler-forward"
                  (not case sensitive)

specifies which end of the Scribbler is considered the front
@param direction  identifies front direction
@pre              direction is either "fluke-forward" or "scribbler-forward"
                  (not case sensitive)


refid: a07e585491ba7af9e13779f9e3db6fd31
name: rGetForwardness
definition: char* rGetForwardness
type: char *
argsstring: ()
briefdescription: Gets the forwardness of the Scribbler.
detaileddescription:
@return either "fluke-forward" or "scribbler-forward"

Gets the forwardness of the Scribbler
@return either "fluke-forward" or "scribbler-forward"


refid: a21581ded1f409300e8f63f4c41c2f2f0
name: rSetLEDFront
definition: void rSetLEDFront
type: void
argsstring: (int led)
briefdescription: Set the front [fluke] LED on or off.
detaileddescription:
@param led  value 1 turns on LED
            value 0 turns off LED
@pre        led must be 0 or 1

Set the front [fluke] LED on or off
@param led  value 1 turns on LED
            value 0 turns off LED
@pre        led must be 0 or 1


refid: a2466176fa2332b88e5013d6b3fe9ceb8
name: rSetLEDBack
definition: void rSetLEDBack
type: void
argsstring: (double led)
briefdescription: Set the the intensity of the back fluke LED,.
detaileddescription:
@param led  intensity of the LED
            values between 0 and 1 provide a range of brightness
            from off to full intensity
            values bigger than 1 are treated as 1 (full brightness)
            values less than 0 are treated as 0 (LED off).

Set the the intensity of the back fluke LED,
@param led  intensity of the LED
            values between 0 and 1 provide a range of brightness
            from off to full intensity
            values bigger than 1 are treated as 1 (full brightness)
            values less than 0 are treated as 0 (LED off).


refid: a80896cdb3ff63acd1fa0a5ce97ba7c9d
name: rGetBattery
definition: double rGetBattery
type: double
argsstring: ()
briefdescription: Get the percentage of volts left in the batteries of the scribbler.
detaileddescription:
@return  percentage of battery voltage

Get the percentage of volts left in the batteries of the scribbler
@warning may not return useful values
@return  percentage of battery voltage


refid: a9296f6acbac4ef59cfc6cb0dc535c60f
name: rGetStall
definition: int rGetStall
type: int
argsstring: (int sampleSize)
detaileddescription:
@param sampleSize  how many readings are taken for each sensor
@pre               sampleSize > 0
@return            whether or not robot current has stalled
@post              Returns 1 if the robot has stalled
                   Returns 0 otherwise.

Determine if robot has stalled
Since readings of each brightness sensor can vary substantially,
  each sensor can be queried sampleSize times and an average obtained.
@param sampleSize  how many readings are taken for each sensor
@pre               sampleSize > 0
@return            whether or not robot current has stalled
@post              Returns 1 if the robot has stalled
                   Returns 0 otherwise.

briefdescription:
Determine if robot has stalled
Since readings of each brightness sensor can vary substantially,
  each sensor can be queried sampleSize times and an average obtained.


refid: a9006ba8c581c7543d7d460d76c06d077
name: rGetLightsAll
definition: void rGetLightsAll
type: void
argsstring: (int lightSensors[3], int sampleSize)
detaileddescription:
@param lightSensors  array to store intensity values
@param sampleSize   how many readings are taken for each sensor
@pre                space already allocated for lightSensors array
                    sampleSize > 0
@post  
                    lightSensors[0] gives average value for left sensor
                    lightSensors[1] gives average value for middle sensor
                    lightSensors[2] gives average value for right sensor
                    Intensity values near 0 represent bright light
                    Intensities may extend to about 65000 for a very dark region.

Get the average values of each of the three light sensors in an array.
Values of each light sensor can somewhat (typically under 5%-10%).
To even out variability, the sensor can be queried sampleSize times
and an average obtained.
@param lightSensors  array to store intensity values
@param sampleSize   how many readings are taken for each sensor
@pre                space already allocated for lightSensors array
                    sampleSize > 0
@post  
                    lightSensors[0] gives average value for left sensor
                    lightSensors[1] gives average value for middle sensor
                    lightSensors[2] gives average value for right sensor
                    Intensity values near 0 represent bright light
                    Intensities may extend to about 65000 for a very dark region.

briefdescription:
Get the average values of each of the three light sensors in an array.
Values of each light sensor can somewhat (typically under 5%-10%).
To even out variability, the sensor can be queried sampleSize times
and an average obtained.


refid: aaba34be55fd5db7d8c1ed08ea7caa6c2
name: rGetLightTxt
definition: int rGetLightTxt
type: int
argsstring: (const char *sensorName, int sampleSize)
detaileddescription:
@param sensorName   name of the light sensor
@pre                sensorName is "left", "center", "middle", or "right"
                    (not case sensitive)
                    designations "center" and "middle" are alternatives
                    for the same light sensor
@param sampleSize   how many readings are taken for the sensor
@pre                sampleSize > 0
@return             reading from the specified light sensor, averaged
                    over sampleSize number of data samples
                    if sensorName invalid, returns -1.0

Get the average values of a specified light sensor.
Values of each light sensor can vary somewhat (typically under 5%-10%).
To even out variability, the sensor can be queried sampleSize times
and an average obtained.
@param sensorName   name of the light sensor
@pre                sensorName is "left", "center", "middle", or "right"
                    (not case sensitive)
                    designations "center" and "middle" are alternatives
                    for the same light sensor
@param sampleSize   how many readings are taken for the sensor
@pre                sampleSize > 0
@return             reading from the specified light sensor, averaged
                    over sampleSize number of data samples
                    if sensorName invalid, returns -1.0

briefdescription:
Get the average values of a specified light sensor.
Values of each light sensor can somewhat (typically under 5%-10%).
To even out variability, the sensor can be queried sampleSize times
and an average obtained.


refid: ab4bf6868424a63a95a85decea8a93fc2
name: rGetIRAll
definition: void rGetIRAll
type: void
argsstring: (int irSensors[2], int sampleSize)
detaileddescription:
@param irSensors   array to store intensity values
@param sampleSize  how many readings are taken for each sensor
@pre               space already allocated for irSensors array
                   sampleSize > 0
@post  
                   irSensors[0] checks obstacle for left sensor
                   irSensors[1] checks obstacle for right sensor
@post              for each irSensors array value
                   return 0 indicates no obstacle detected
                   return 1 indicates obstacle detected  

Get an array of true/false values regarding the presence of an obstacle,
based on the average values of each of the three IR sensors.
Since readings of each light sensor can vary substantially,
   each sensor can be queried sampleSize times and an average obtained.
@param irSensors   array to store intensity values
@param sampleSize  how many readings are taken for each sensor
@pre               space already allocated for irSensors array
                   sampleSize > 0
@post  
                   irSensors[0] checks obstacle for left sensor
                   irSensors[1] checks obstacle for right sensor
@post              for each irSensors array value
                   return 0 indicates no obstacle detected
                   return 1 indicates obstacle detected  

briefdescription:
Get an array of true/false values regarding the presence of obstacle
based on the average values of each of the three IR sensors.
Since readings of each light sensor can vary substantially,
   each sensor can be queried sampleSize times and an average obtained.


refid: afdf7579ce632c07de1d90f27d67abff7
name: rGetIRTxt
definition: int rGetIRTxt
type: int
argsstring: (const char *sensorName, int sampleSize)
detaileddescription:
@param sensorName   name of the light sensor
@pre                sensorName is "left" or "right"
                    (not case sensitive)
@param sampleSize   how many readings are taken for the sensor
@pre                sampleSize > 0
@return             true/false (0/1) determination of obstacle, based on IR
                    sensorName sensor, averaged over sampleSize number of
                    data samples
@post               return 0 indicates no obstacle detected
                    return 1 indicates obstacle detected

Use specified IR sensor to determine if obstacle is present.
Since values of each light sensor can vary substantially,
the sensor can be queried sampleSize times and an average obtained.
@param sensorName   name of the light sensor
@pre                sensorName is "left" or "right"
                    (not case sensitive)
@param sampleSize   how many readings are taken for the sensor
@pre                sampleSize > 0
@return             true/false (0/1) determination of obstacle, based on IR
                    sensorName sensor, averaged over sampleSize number of
                    data samples
@post               return 0 indicates no obstacle detected
                    return 1 indicates obstacle detected

briefdescription:
Use specified IR sensor to determine if obstacle is present.
Since values of each light sensor can vary substantially,
the sensor can be queried sampleSize times and an average obtained.


refid: a7fc13d53088ba239a95c99b46b9607e8
name: rGetLine
definition: void rGetLine
type: void
argsstring: (int lineSensors[2], int sampleSize)
detaileddescription:
@warning            results of these sensors may be flakey!
@param lineSensors  array to store line values detected
@param sampleSize   how many readings are taken for each sensor
@pre                space already allocated for lineSensors array
                    sampleSize > 0
@post               lineSensors[0] checks left sensor for line
                    lineSensors[1] checks right sensor for line
@post               for each irSensors array value
                    return 0 indicates line is identified
                    return 1 indicates line is not identified

Use Scribbler 2 line sensors of Scribbler to check for a black line
on a white surface under the robot.
Since values of each light sensor can vary substantially,
   the sensor can be queried sampleSize times and an average obtained.
@warning            results of these sensors may be flakey!
@param lineSensors  array to store line values detected
@param sampleSize   how many readings are taken for each sensor
@pre                space already allocated for lineSensors array
                    sampleSize > 0
@post               lineSensors[0] checks left sensor for line
                    lineSensors[1] checks right sensor for line
@post               for each irSensors array value
                    return 0 indicates line is identified
                    return 1 indicates line is not identified

briefdescription:
Use Scribbler 2 line sensors of Scribbler to check for a black line
on a white surface under the robot.
Since values of each light sensor can vary substantially,
   the sensor can be queried sampleSize times and an average obtained.


refid: ab319898f4ab7d48f15e1215db8e5b4ba
name: rSetIRPower
definition: void rSetIRPower
type: void
argsstring: (int power)
briefdescription: Set the amount of power for the dongle's IR sensors.
detaileddescription:
@param power  the desired power level for the IR sensors
@pre          power is between 0 and 255 (inclusive)

Set the amount of power for the dongle's IR sensors
@param power  the desired power level for the IR sensors
@pre          power is between 0 and 255 (inclusive)


refid: a3a47f1f85c9fa6d68b5ebd8c0ad2e484
name: rGetObstacleAll
definition: void rGetObstacleAll
type: void
argsstring: (int obstSensors[3], int sampleSize)
detaileddescription:
@param obstSensors   array to store intensity values
@param sampleSize    how many readings are taken for each sensor
@pre                 space already allocated for obstSensors array
                     sampleSize > 0
@post                obstSensors[0] gives average value for left sensor
                     obstSensors[1] gives average value for middle sensor
                     obstSensors[2] gives average value for right sensor
                     Obstacle values near 0 represent no obstacle is seen
                     Obstacle values may approach 6000 as obstacle gets close.
@warning             As battery degrades, sensor readings degrade,
                     yielding systematically lower numbers.

Get the average values of the three obstacle sensors in an array.
Since readings of each obstacle sensor can vary substantially (successive
     readings may differ by several hundred or more),
     each sensor can be queried sampleSize times and an average obtained.
@param obstSensors   array to store intensity values
@param sampleSize    how many readings are taken for each sensor
@pre                 space already allocated for obstSensors array
                     sampleSize > 0
@post                obstSensors[0] gives average value for left sensor
                     obstSensors[1] gives average value for middle sensor
                     obstSensors[2] gives average value for right sensor
                     Obstacle values near 0 represent no obstacle is seen
                     Obstacle values may approach 6000 as obstacle gets close.
@warning             As battery degrades, sensor readings degrade,
                     yielding systematically lower numbers.

briefdescription:
Get the average values of the three obstacle sensors in an array.
Since readings of each obstacle sensor can vary substantially (successive
     readings may differ by several hundred or more),
     each sensor can be queried sampleSize times and an average obtained.


refid: a5853bf9f106b47ed0e767adf8fab0d0b
name: rGetObstacleTxt
definition: int rGetObstacleTxt
type: int
argsstring: (const char *sensorName, int sampleSize)
detaileddescription:
@param sensorName  name of the obstacle sensor
@pre               sensorName is "left", "center", "middle", or "right"
                   (not case sensitive)
                   designations "center" and "middle" are alternatives
                   for the same light sensor
@param sampleSize  how many readings are taken for the sensor
@pre               space already allocated for vals array
                   sampleSize > 0
@return            reading from the specified obstacle sensor, averaged
                   over sampleSize number of data samples
                   Obstacle values near 0 represent no obstacle is seen
                   Obstacle values may approach 6000 as obstacle gets close.
@warning           As battery degrades, sensor values degrade,
                   yielding systematically lower numbers.

Get the average values of a specified obstacle (IR) sensor.
Since values of each obstacle sensor can vary substantially (successive
     readings may differ by several hundred or more),
     the sensor can be queried sampleSize times and an average obtained.
@param sensorName  name of the obstacle sensor
@pre               sensorName is "left", "center", "middle", or "right"
                   (not case sensitive)
                   designations "center" and "middle" are alternatives
                   for the same light sensor
@param sampleSize  how many readings are taken for the sensor
@pre               space already allocated for vals array
                   sampleSize > 0
@return            reading from the specified obstacle sensor, averaged
                   over sampleSize number of data samples
                   Obstacle values near 0 represent no obstacle is seen
                   Obstacle values may approach 6000 as obstacle gets close.
@warning           As battery degrades, sensor values degrade,
                   yielding systematically lower numbers.

briefdescription:
Get the average values of a specified obstacle (IR) sensor.
Since values of each obstacle sensor can vary substantially (successive
     readings may differ by several hundred or more),
     the sensor can be queried sampleSize times and an average obtained.


refid: a98820d670fcacb6780e68a58a4bc0a8a
name: rGetBrightAll
definition: void rGetBrightAll
type: void
argsstring: (int brightSensors[3], int sampleSize)
detaileddescription:
@param brightSensors  array to store intensity values
@param sampleSize     how many readings are taken for each sensor
@pre                  space already allocated for brightSensors array
                      sampleSize > 0
@post                 brightSensors[0] gives average value for left sensor
                      brightSensors[1] gives average value for middle sensor
                      brightSensors[2] gives average value for right sensor
                      Brightness values near 0 represent bright light
                      Brightness values may extend to about 65535 for a very dark region.

Read the Fluke's virtual light sensors.
 Since readings of each brightness sensor can vary substantially (successive
    readings may differ by 5000-10000),
    each sensor can be queried sampleSize times and an average obtained.
@param brightSensors  array to store intensity values
@param sampleSize     how many readings are taken for each sensor
@pre                  space already allocated for brightSensors array
                      sampleSize > 0
@post                 brightSensors[0] gives average value for left sensor
                      brightSensors[1] gives average value for middle sensor
                      brightSensors[2] gives average value for right sensor
                      Brightness values near 0 represent bright light
                      Brightness values may extend to about 65535 for a very dark region.

briefdescription:
Read the Fluke's virtual light sensors.
 Since readings of each brightness sensor can vary substantially (successive
    readings may differ by 5000-10000),
    each sensor can be queried sampleSize times and an average obtained.


refid: a6c898c1c12957822fbd0e2b68f573c4d
name: rGetBrightTxt
definition: int rGetBrightTxt
type: int
argsstring: (char *sensorName, int sampleSize)
detaileddescription:
@param sensorName  name of the obstacle sensor
@pre               sensorName is "left", "center", "middle", or "right"
                   (not case sensitive)
                   designations "center" and "middle" are alternatives
                   for the same light sensor
@param sampleSize  how many readings are taken for the sensor
@pre               sampleSize > 0
@return            reading from the specified obstacle sensor, averaged
                   over sampleSize number of data samples
                   Brightness values near 0 represent bright light
                   Brightness values may extend to about 65535 for a very dark region.

Reads one of the Fluke's virtual light sensors.
Since values of each obstacle sensor can vary substantially (successive
   readings may differ by 5000-10000),
   the sensor can be queried sampleSize times and an average obtained.
@param sensorName  name of the obstacle sensor
@pre               sensorName is "left", "center", "middle", or "right"
                   (not case sensitive)
                   designations "center" and "middle" are alternatives
                   for the same light sensor
@param sampleSize  how many readings are taken for the sensor
@pre               sampleSize > 0
@return            reading from the specified obstacle sensor, averaged
                   over sampleSize number of data samples
                   Brightness values near 0 represent bright light
                   Brightness values may extend to about 65535 for a very dark region.

briefdescription:
Reads one of the Fluke's virtual light sensors.
Since values of each obstacle sensor can vary substantially (successive
   readings may differ by 5000-10000),
   the sensor can be queried sampleSize times and an average obtained.


refid: a1e10a9735a4b8dc8c79100905c30ecab
name: rGetInfo
definition: void rGetInfo
type: void
argsstring: (char *infoBuffer)
detaileddescription:
@param infoBuffer  a pre-defined, 60-character array 
@post              infoBuffer contains relevant robot information

returns information about the robot's dongle, firmware, and 
communication mode as a 60 character array in infoBuffer. 
@param infoBuffer  a pre-defined, 60-character array 
@post              infoBuffer contains relevant robot information

briefdescription:
returns information about the robot's dongle, firmware, and 
communication mode as a 60 character array in infoBuffer.


refid: a1b2462eb7a3149a89cfe73f39339ed89
name: rTurnLeft
definition: void rTurnLeft
type: void
argsstring: (double speed, double time)
briefdescription: turn Scribbler left for a specified time and speed
detaileddescription:
@param speed  the rate at which the robot should move left
              linear range:  -1.0 specifies right turn at full speed
                             0.0 specifies no turn
                             1.0 specifies left turn at full speed
@param time   specifies the duration of the turn
              if negative:    robot continues to turn until given another
                              motion command or disconnected (non-blocking)
              if nonnegative: robot turns for the given duration, in seconds

turn Scribbler left for a specified time and speed
@param speed  the rate at which the robot should move left
              linear range:  -1.0 specifies right turn at full speed
                             0.0 specifies no turn
                             1.0 specifies left turn at full speed
@param time   specifies the duration of the turn
              if negative:    robot continues to turn until given another
                              motion command or disconnected (non-blocking)
              if nonnegative: robot turns for the given duration, in seconds


refid: a0c3496dd17992e9788110c15c017e566
name: rTurnRight
definition: void rTurnRight
type: void
argsstring: (double speed, double time)
briefdescription: turn Scribbler right for a specified time and speed
detaileddescription:
 @param speed  the rate at which the robot should move right
               linear range: -1.0 specifies left turn at full speed
                             0.0 specifies no turn
                             1.0 specifies right turn at full speed
 @param time   specifies the duration of the turn
               if negative:    robot continues to turn until given another
                               motion command or disconnected (non-blocking)
               if nonnegative: robot turns for the given duration, in seconds

turn Scribbler right for a specified time and speed  
 @param speed  the rate at which the robot should move right
               linear range: -1.0 specifies left turn at full speed
                             0.0 specifies no turn
                             1.0 specifies right turn at full speed
 @param time   specifies the duration of the turn
               if negative:    robot continues to turn until given another
                               motion command or disconnected (non-blocking)
               if nonnegative: robot turns for the given duration, in seconds


refid: aa1a97cc92ee785afb8af4e248d08cbb9
name: rTurnSpeed
definition: void rTurnSpeed
type: void
argsstring: (char *direction, double speed, double time)
briefdescription: turn Scribbler in direction for a specified time and speed
detaileddescription:
@param direction  direction of turn, based on looking from
                  the center of the robot and facing forward
@param speed      the rate at which the robot should move forward
                  linear range:  -1.0 specifies turn at full speed
                                 0.0 specifies no turn
                                 1.0 specifies turn at full speed
@param time       specifies the duration of the turn
                  if negative: robot continues to turn until given another
                               motion command or disconnected
                  if nonnegative: robot turns for the given duration,
                   in seconds
@pre              direction is "left" or "right", case insensitive

turn Scribbler in direction for a specified time and speed
@param direction  direction of turn, based on looking from
                  the center of the robot and facing forward
@param speed      the rate at which the robot should move forward
                  linear range:  -1.0 specifies turn at full speed
                                 0.0 specifies no turn
                                 1.0 specifies turn at full speed
@param time       specifies the duration of the turn
                  if negative: robot continues to turn until given another
                               motion command or disconnected
                  if nonnegative: robot turns for the given duration, in seconds
@pre              direction is "left" or "right", case insensitive


refid: aaf2b57e29c053c7e3901ec5ee3cb047d
name: rForward
definition: void rForward
type: void
argsstring: (double speed, double time)
briefdescription: moves Scribbler forward for a specified time and speed
detaileddescription:
@param speed   the rate at which the robot should move forward
               linear range:  -1.0 specifies move backward at full speed
                              0.0 specifies no forward/backward movement
                              1.0 specifies move forward at full speed
@param time    specifies the duration of movement
               if negative:    robot continues to move forward until given
                               another motion command or disconnected 
                               (non-blocking)
               if nonnegative: robot moves forward for the given duration, in
                               seconds

moves Scribbler forward for a specified time and speed
@param speed   the rate at which the robot should move forward
               linear range:  -1.0 specifies move backward at full speed
                              0.0 specifies no forward/backward movement
                              1.0 specifies move forward at full speed
@param time    specifies the duration of movement
               if negative:    robot continues to move forward until given another
                               motion command or disconnected (non-blocking)
               if nonnegative: robot moves forward for the given duration, in
                               seconds


refid: af55f107794f40ee2f77dd6817ad1453f
name: rFastForward
definition: void rFastForward
type: void
argsstring: (double time)
briefdescription: moves Scribbler forward at the largest possible speed for a specified time
detaileddescription:
@param time  specifies the duration of movement
             if negative: robot continues to move forward until given another
                          motion command or disconnected (non-blocking)
             if nonnegative: robot moves forward for the given duration, in
                             seconds
@warning     may take longer than usual to execute

moves Scribbler forward at the largest possible speed for a specified time 
@param time  specifies the duration of movement
             if negative: robot continues to move forward until given another
                          motion command or disconnected (non-blocking)
             if nonnegative: robot moves forward for the given duration, in
                             seconds
@warning     may take longer than usual to execute


refid: aa5544de8b24ee7917bcb1ba695071459
name: rBackward
definition: void rBackward
type: void
argsstring: (double speed, double time)
briefdescription: moves Scribbler backward for a specified time and speed
detaileddescription:
@param speed  the rate at which the robot should move backward
              linear range:  -1.0 specifies move forward at full speed
                             0.0 specifies no forward/backward movement
                             1.0 specifies move backward at full speed
@param time   specifies the duration of the turn
              if negative: robot continues to go backward until given another
                           motion command or disconnected (non-blocking)
              if nonnegative: robot moves backward for the given duration, in
                              seconds

moves Scribbler backward for a specified time and speed  
@param speed  the rate at which the robot should move backward
              linear range:  -1.0 specifies move forward at full speed
                             0.0 specifies no forward/backward movement
                             1.0 specifies move backward at full speed
@param time   specifies the duration of the turn
              if negative: robot continues to go backward until given another
                           motion command or disconnected (non-blocking)
              if nonnegative: robot moves backward for the given duration, in
                              seconds


refid: a6712dd6e8442e19ff28158adeaf7c0d0
name: rMotors
definition: void rMotors
type: void
argsstring: (double leftSpeed, double rightSpeed)
detaileddescription:
@param leftSpeed  the rate at which the left wheel should turn
             linear range:  -1.0 specifies move backward at full speed
                             0.0 specifies no forward/backward movement
                             1.0 specifies move forwardward at full speed
@param rightSpeed the rate at which the right wheel should turn
             linear range:  -1.0 specifies move backward at full speed
                             0.0 specifies no forward/backward movement
                             1.0 specifies move forward at full speed

move robot with given speeds for the left and right motors
continues until given another motion command or disconnected (non-blocking)
@param leftSpeed  the rate at which the left wheel should turn
             linear range:  -1.0 specifies move backward at full speed
                             0.0 specifies no forward/backward movement
                             1.0 specifies move forwardward at full speed
@param rightSpeed  the rate at which the right wheel should turn
             linear range:  -1.0 specifies move backward at full speed
                             0.0 specifies no forward/backward movement
                             1.0 specifies move forward at full speed

briefdescription:
move robot with given speeds for the left and right motors
continues until given another motion command or disconnected (non-blocking)


refid: aae5f14b4e6e28456e3a563b027052c02
name: rSavePicture
definition: void rSavePicture
type: void
argsstring: (Picture pic, char *filename)
briefdescription: Save a Picture to a .jpeg.
detaileddescription:
@param pic      RGB picture struct from Scribbler 2 camera
@param filename the name of the file
@pre            filename ends with .jpeg or .jpg.
@post           If the file does not exist, a new file will be created.
@post           If the file exists, the file will be overwritten.

Save a Picture to a .jpeg
@param pic      RGB picture struct from Scribbler 2 camera
@param filename the name of the file
@pre            filename ends with .jpeg or .jpg.
@post           If the file does not exist, a new file will be created.
@post           If the file exists, the file will be overwritten.


refid: a22bed206f3ae7563a116be255e91906e
name: rLoadPicture
definition: Picture rLoadPicture
type: Picture
argsstring: (char *filename)
briefdescription: Load a picture from a .jpeg file.
detaileddescription:
@param filename  the name of the file
@pre             file must exist
@pre             file must be a 256x192 .jpeg or .jpg
@return          Picture

Load a picture from a .jpeg file.
@param filename  the name of the file
@pre             file must exist
@pre             file must be a 256x192 .jpeg or .jpg
@return          Picture


refid: aef27262c15e206579736b5fca76b00c9
name: rDisplayPicture
definition: void rDisplayPicture
type: void
argsstring: (Picture pic, double duration, const char *windowTitle)
briefdescription: Display a picture in a new window.
detaileddescription:
@param pic         RGB picture struct from Scribbler 2 camera
@param duration    if duration > 0, operation is blocking
                   if duration <= 0, operation is non-blocking
                   for duration != 0, picture displayed for abs(duration) 
                           seconds or until picture closed manually
                   if duration == 0, picture displayed until closed manually
@param windowTitle The title of the window that appears.
                   white spaces will be replaced with underscores. 
@pre               windowTitle is less than 100 characters. 

Display a picture in a new window
@param pic         RGB picture struct from Scribbler 2 camera
@param duration    if duration > 0, operation is blocking
                   if duration <= 0, operation is non-blocking
                   for duration != 0, picture displayed for abs(duration) 
                           seconds or until picture closed manually
                   if duration == 0, picture displayed until closed manually
@param windowTitle The title of the window that appears.
                   white spaces will be replaced with underscores. 
@pre               windowTitle is less than 100 characters. 


refid: aadfc48e2707da0e4f1f01e6aa14b6ef4
name: rConnect
definition: int rConnect
type: int
argsstring: (const char *address)
briefdescription: connects program to Scribbler
detaileddescription:
@param address  string, giving name of workstation port
                or a Scribbler Bluetooth designation

                several string formats are possible
                a communications port, such as "/dev/rfcomm0"
                a MAC address, such as "00:1E:19:01:0E:13"
                a Scribbler 2 fluke serial number, such as "245787"
                a full IPRE serial number, such as "IPRE245787"
                a Fluke 2 serial number (hexadecimal), such as "021F"
                a full Fluke 2 serial number, such as "Fluke2-021F"

@return         the socket number of communications port

@post           subsequent communications will take place through
                this socket, unless changed by rSetConnection


refid: a3c53b72530db178106d17242b205a196
name: rSetConnection
definition: void rSetConnection
type: void
argsstring: (int new_socket_num)
briefdescription: set current connection to the socket number
detaileddescription:
@param new_socket_num  the number of an open socket for communication
@pre                   new_socket_num has been returned by rConnect
                       the designated socket has not been closed


refid: aa46e349ecd38fc90f8d7cea9bb8678d6
name: rBeep
definition: void rBeep
type: void
argsstring: (double duration, int frequency)
briefdescription: Beeps with the given duration and frequency.
detaileddescription:
@param duration   length of note in seconds
@param frequency  frequency of pitch in cycles per second (hertz)
@pre              duration > 0.0


refid: a37ccc278b3ecca6290debf1929d1e479
name: rBeep2
definition: void rBeep2
type: void
argsstring: (double duration, int freq1, int freq2)
briefdescription: Generates two notes for the prescribed duration.
detaileddescription:
@param duration  length of note in seconds
@param freq1     frequency of first pitch in cycles per second (hertz)
@param freq2     frequency of second pitch in cycles per second (hertz)
@pre             duration > 0.0


refid: ab6f8b6b28334162e70f7cf3a3b165e4b
name: rSetName
definition: void rSetName
type: void
argsstring: (const char *name)
briefdescription: Change name stored in the robot to the 16-byte name given.
detaileddescription:
@param name  specifies new name of robot
             if < 16 bytes given, name is filled with null characters
             if >= 16 bytes given, name is truncated to 15 bytes plus null


refid: a3753b86dcb4de002e8456501ca35edae
name: rSetForwardness
definition: void rSetForwardness
type: void
argsstring: (char *direction)
briefdescription: specifies which end of the Scribbler is considered the front
detaileddescription:
@param direction  identifies front direction
@pre              direction is either "fluke-forward" or "scribbler-forward"
                  (not case sensitive)


refid: a2466176fa2332b88e5013d6b3fe9ceb8
name: rSetLEDBack
definition: void rSetLEDBack
type: void
argsstring: (double led)
briefdescription: Set the the intensity of the back fluke LED,.
detaileddescription:
@param led  intensity of the LED
            values between 0 and 1 provide a range of brightness
            from off to full intensity
            values bigger than 1 are treated as 1 (full brightness)
            values less than 0 are treated as 0 (LED off).


refid: a9296f6acbac4ef59cfc6cb0dc535c60f
name: rGetStall
definition: int rGetStall
type: int
argsstring: (int sampleSize)
detaileddescription:
@param sampleSize  how many readings are taken for each sensor
@pre               sampleSize > 0
@return            whether or not robot current has stalled
@post              Returns 1 if the robot has stalled
                   Returns 0 otherwise.

briefdescription:
Determine if robot has stalled
Since readings of each brightness sensor can vary substantially,
  each sensor can be queried sampleSize times and an average obtained.


refid: a9006ba8c581c7543d7d460d76c06d077
name: rGetLightsAll
definition: void rGetLightsAll
type: void
argsstring: (int lightSensors[3], int sampleSize)
detaileddescription:
@param lightSensors  array to store intensity values
@param sampleSize   how many readings are taken for each sensor
@pre                space already allocated for lightSensors array
                    sampleSize > 0
@post  
                    lightSensors[0] gives average value for left sensor
                    lightSensors[1] gives average value for middle sensor
                    lightSensors[2] gives average value for right sensor
                    Intensity values near 0 represent bright light
                    Intensities may extend to about 65000 for a very dark region.

briefdescription:
Get the average values of each of the three light sensors in an array.
Values of each light sensor can somewhat (typically under 5%-10%).
To even out variability, the sensor can be queried sampleSize times
and an average obtained.


refid: aaba34be55fd5db7d8c1ed08ea7caa6c2
name: rGetLightTxt
definition: int rGetLightTxt
type: int
argsstring: (const char *sensorName, int sampleSize)
detaileddescription:
@param sensorName   name of the light sensor
@pre                sensorName is "left", "center", "middle", or "right"
                    (not case sensitive)
                    designations "center" and "middle" are alternatives
                    for the same light sensor
@param sampleSize   how many readings are taken for the sensor
@pre                sampleSize > 0
@return             reading from the specified light sensor, averaged
                    over sampleSize number of data samples
                    if sensorName invalid, returns -1.0

briefdescription:
Get the average values of a specified light sensor.
Values of each light sensor can somewhat (typically under 5%-10%).
To even out variability, the sensor can be queried sampleSize times
and an average obtained.


refid: ab4bf6868424a63a95a85decea8a93fc2
name: rGetIRAll
definition: void rGetIRAll
type: void
argsstring: (int irSensors[2], int sampleSize)
detaileddescription:
@param irSensors   array to store intensity values
@param sampleSize  how many readings are taken for each sensor
@pre               space already allocated for irSensors array
                   sampleSize > 0
@post  
                   irSensors[0] checks obstacle for left sensor
                   irSensors[1] checks obstacle for right sensor
@post              for each irSensors array value
                   return 0 indicates no obstacle detected
                   return 1 indicates obstacle detected  

briefdescription:
Get an array of true/false values regarding the presence of obstacle
based on the average values of each of the three IR sensors.
Since readings of each light sensor can vary substantially,
   each sensor can be queried sampleSize times and an average obtained.


refid: afdf7579ce632c07de1d90f27d67abff7
name: rGetIRTxt
definition: int rGetIRTxt
type: int
argsstring: (const char *sensorName, int sampleSize)
detaileddescription:
@param sensorName   name of the light sensor
@pre                sensorName is "left" or "right"
                    (not case sensitive)
@param sampleSize   how many readings are taken for the sensor
@pre                sampleSize > 0
@return             true/false (0/1) determination of obstacle, based on IR
                    sensorName sensor, averaged over sampleSize number of
                    data samples
@post               return 0 indicates no obstacle detected
                    return 1 indicates obstacle detected

briefdescription:
Use specified IR sensor to determine if obstacle is present.
Since values of each light sensor can vary substantially,
the sensor can be queried sampleSize times and an average obtained.


refid: a7fc13d53088ba239a95c99b46b9607e8
name: rGetLine
definition: void rGetLine
type: void
argsstring: (int lineSensors[2], int sampleSize)
detaileddescription:
@warning            results of these sensors may be flakey!
@param lineSensors  array to store line values detected
@param sampleSize   how many readings are taken for each sensor
@pre                space already allocated for lineSensors array
                    sampleSize > 0
@post               lineSensors[0] checks left sensor for line
                    lineSensors[1] checks right sensor for line
@post               for each irSensors array value
                    return 0 indicates line is identified
                    return 1 indicates line is not identified

briefdescription:
Use Scribbler 2 line sensors of Scribbler to check for a black line
on a white surface under the robot.
Since values of each light sensor can vary substantially,
   the sensor can be queried sampleSize times and an average obtained.


refid: ab319898f4ab7d48f15e1215db8e5b4ba
name: rSetIRPower
definition: void rSetIRPower
type: void
argsstring: (int power)
briefdescription: Set the amount of power for the dongle's IR sensors.
detaileddescription:
@param power  the desired power level for the IR sensors
@pre          power is between 0 and 255 (inclusive)


refid: a3a47f1f85c9fa6d68b5ebd8c0ad2e484
name: rGetObstacleAll
definition: void rGetObstacleAll
type: void
argsstring: (int obstSensors[3], int sampleSize)
detaileddescription:
@param obstSensors   array to store intensity values
@param sampleSize    how many readings are taken for each sensor
@pre                 space already allocated for obstSensors array
                     sampleSize > 0
@post                obstSensors[0] gives average value for left sensor
                     obstSensors[1] gives average value for middle sensor
                     obstSensors[2] gives average value for right sensor
                     Obstacle values near 0 represent no obstacle is seen
                     Obstacle values may approach 6000 as obstacle gets close.
@warning             As battery degrades, sensor readings degrade,
                     yielding systematically lower numbers.

briefdescription:
Get the average values of the three obstacle sensors in an array.
Since readings of each obstacle sensor can vary substantially (successive
     readings may differ by several hundred or more),
     each sensor can be queried sampleSize times and an average obtained.


refid: a5853bf9f106b47ed0e767adf8fab0d0b
name: rGetObstacleTxt
definition: int rGetObstacleTxt
type: int
argsstring: (const char *sensorName, int sampleSize)
detaileddescription:
@param sensorName  name of the obstacle sensor
@pre               sensorName is "left", "center", "middle", or "right"
                   (not case sensitive)
                   designations "center" and "middle" are alternatives
                   for the same light sensor
@param sampleSize  how many readings are taken for the sensor
@pre               space already allocated for vals array
                   sampleSize > 0
@return            reading from the specified obstacle sensor, averaged
                   over sampleSize number of data samples
                   Obstacle values near 0 represent no obstacle is seen
                   Obstacle values may approach 6000 as obstacle gets close.
@warning           As battery degrades, sensor values degrade,
                   yielding systematically lower numbers.

briefdescription:
Get the average values of a specified obstacle (IR) sensor.
Since values of each obstacle sensor can vary substantially (successive
     readings may differ by several hundred or more),
     the sensor can be queried sampleSize times and an average obtained.


refid: a98820d670fcacb6780e68a58a4bc0a8a
name: rGetBrightAll
definition: void rGetBrightAll
type: void
argsstring: (int brightSensors[3], int sampleSize)
detaileddescription:
@param brightSensors  array to store intensity values
@param sampleSize     how many readings are taken for each sensor
@pre                  space already allocated for brightSensors array
                      sampleSize > 0
@post                 brightSensors[0] gives average value for left sensor
                      brightSensors[1] gives average value for middle sensor
                      brightSensors[2] gives average value for right sensor
                      Brightness values near 0 represent bright light
                      Brightness values may extend to about 65535 for a very dark region.

briefdescription:
Read the Fluke's virtual light sensors.
 Since readings of each brightness sensor can vary substantially (successive
    readings may differ by 5000-10000),
    each sensor can be queried sampleSize times and an average obtained.


refid: a6c898c1c12957822fbd0e2b68f573c4d
name: rGetBrightTxt
definition: int rGetBrightTxt
type: int
argsstring: (char *sensorName, int sampleSize)
detaileddescription:
@param sensorName  name of the obstacle sensor
@pre               sensorName is "left", "center", "middle", or "right"
                   (not case sensitive)
                   designations "center" and "middle" are alternatives
                   for the same light sensor
@param sampleSize  how many readings are taken for the sensor
@pre               sampleSize > 0
@return            reading from the specified obstacle sensor, averaged
                   over sampleSize number of data samples
                   Brightness values near 0 represent bright light
                   Brightness values may extend to about 65535 for a very dark region.

briefdescription:
Reads one of the Fluke's virtual light sensors.
Since values of each obstacle sensor can vary substantially (successive
   readings may differ by 5000-10000),
   the sensor can be queried sampleSize times and an average obtained.


refid: a1e10a9735a4b8dc8c79100905c30ecab
name: rGetInfo
definition: void rGetInfo
type: void
argsstring: (char *infoBuffer)
detaileddescription:
@param infoBuffer  a pre-defined, 60-character array 
@post              infoBuffer contains relevant robot information

briefdescription:
returns information about the robot's dongle, firmware, and 
communication mode as a 60 character array in infoBuffer.


refid: a1b2462eb7a3149a89cfe73f39339ed89
name: rTurnLeft
definition: void rTurnLeft
type: void
argsstring: (double speed, double time)
briefdescription: turn Scribbler left for a specified time and speed
detaileddescription:
@param speed  the rate at which the robot should move left
              linear range:  -1.0 specifies right turn at full speed
                             0.0 specifies no turn
                             1.0 specifies left turn at full speed
@param time   specifies the duration of the turn
              if negative:    robot continues to turn until given another
                              motion command or disconnected (non-blocking)
              if nonnegative: robot turns for the given duration, in seconds


refid: a0c3496dd17992e9788110c15c017e566
name: rTurnRight
definition: void rTurnRight
type: void
argsstring: (double speed, double time)
briefdescription: turn Scribbler right for a specified time and speed
detaileddescription:
 @param speed  the rate at which the robot should move right
               linear range: -1.0 specifies left turn at full speed
                             0.0 specifies no turn
                             1.0 specifies right turn at full speed
 @param time   specifies the duration of the turn
               if negative:    robot continues to turn until given another
                               motion command or disconnected (non-blocking)
               if nonnegative: robot turns for the given duration, in seconds


refid: aa1a97cc92ee785afb8af4e248d08cbb9
name: rTurnSpeed
definition: void rTurnSpeed
type: void
argsstring: (char *direction, double speed, double time)
briefdescription: turn Scribbler in direction for a specified time and speed
detaileddescription:
@param direction  direction of turn, based on looking from
                  the center of the robot and facing forward
@param speed      the rate at which the robot should move forward
                  linear range:  -1.0 specifies turn at full speed
                                 0.0 specifies no turn
                                 1.0 specifies turn at full speed
@param time       specifies the duration of the turn
                  if negative: robot continues to turn until given another
                               motion command or disconnected
                  if nonnegative: robot turns for the given duration,
                   in seconds
@pre              direction is "left" or "right", case insensitive


refid: aaf2b57e29c053c7e3901ec5ee3cb047d
name: rForward
definition: void rForward
type: void
argsstring: (double speed, double time)
briefdescription: moves Scribbler forward for a specified time and speed
detaileddescription:
@param speed   the rate at which the robot should move forward
               linear range:  -1.0 specifies move backward at full speed
                              0.0 specifies no forward/backward movement
                              1.0 specifies move forward at full speed
@param time    specifies the duration of movement
               if negative:    robot continues to move forward until given
                               another motion command or disconnected 
                               (non-blocking)
               if nonnegative: robot moves forward for the given duration, in
                               seconds


refid: af55f107794f40ee2f77dd6817ad1453f
name: rFastForward
definition: void rFastForward
type: void
argsstring: (double time)
briefdescription: moves Scribbler forward at the largest possible speed for a specified time
detaileddescription:
@param time  specifies the duration of movement
             if negative: robot continues to move forward until given another
                          motion command or disconnected (non-blocking)
             if nonnegative: robot moves forward for the given duration, in
                             seconds
@warning     may take longer than usual to execute


refid: aa5544de8b24ee7917bcb1ba695071459
name: rBackward
definition: void rBackward
type: void
argsstring: (double speed, double time)
briefdescription: moves Scribbler backward for a specified time and speed
detaileddescription:
@param speed  the rate at which the robot should move backward
              linear range:  -1.0 specifies move forward at full speed
                             0.0 specifies no forward/backward movement
                             1.0 specifies move backward at full speed
@param time   specifies the duration of the turn
              if negative: robot continues to go backward until given another
                           motion command or disconnected (non-blocking)
              if nonnegative: robot moves backward for the given duration, in
                              seconds


refid: a6712dd6e8442e19ff28158adeaf7c0d0
name: rMotors
definition: void rMotors
type: void
argsstring: (double leftSpeed, double rightSpeed)
detaileddescription:
@param leftSpeed  the rate at which the left wheel should turn
             linear range:  -1.0 specifies move backward at full speed
                             0.0 specifies no forward/backward movement
                             1.0 specifies move forwardward at full speed
@param rightSpeed the rate at which the right wheel should turn
             linear range:  -1.0 specifies move backward at full speed
                             0.0 specifies no forward/backward movement
                             1.0 specifies move forward at full speed

briefdescription:
move robot with given speeds for the left and right motors
continues until given another motion command or disconnected (non-blocking)


refid: aae5f14b4e6e28456e3a563b027052c02
name: rSavePicture
definition: void rSavePicture
type: void
argsstring: (Picture pic, char *filename)
briefdescription: Save a Picture to a .jpeg.
detaileddescription:
@param pic      RGB picture struct from Scribbler 2 camera
@param filename the name of the file
@pre            filename ends with .jpeg or .jpg.
@post           If the file does not exist, a new file will be created.
@post           If the file exists, the file will be overwritten.


refid: a22bed206f3ae7563a116be255e91906e
name: rLoadPicture
definition: Picture rLoadPicture
type: Picture
argsstring: (char *filename)
briefdescription: Load a picture from a .jpeg file.
detaileddescription:
@param filename  the name of the file
@pre             file must exist
@pre             file must be a 256x192 .jpeg or .jpg
@return          Picture


refid: aef27262c15e206579736b5fca76b00c9
name: rDisplayPicture
definition: void rDisplayPicture
type: void
argsstring: (Picture pic, double duration, const char *windowTitle)
briefdescription: Display a picture in a new window.
detaileddescription:
@param pic         RGB picture struct from Scribbler 2 camera
@param duration    if duration > 0, operation is blocking
                   if duration <= 0, operation is non-blocking
                   for duration != 0, picture displayed for abs(duration) 
                           seconds or until picture closed manually
                   if duration == 0, picture displayed until closed manually
@param windowTitle The title of the window that appears.
                   white spaces will be replaced with underscores. 
@pre               windowTitle is less than 100 characters. 


