Create/ASUS Sensors

From Tekkotsu Wiki

Jump to: navigation, search

The Create/ASUS robot's sensors include various devices: two pushbuttons, left and right bump switches, four cliff detectors, an IR wall detector, a built-in odometer, battery state sensors, and several more.

Sensor, button, and output names are defined in the file Tekkotsu/Shared/CreateInfo.h. Most of the information on this page comes from the Create Open Interface manual.

Contents

Sensors

RobotInfo Name Description Value
DigitalIn0Digital inputs 0-3 (via DB-25 connector)0/1
DigitalIn1
DigitalIn2
DigitalIn3
AnalogInAnalog input (via DB-25 connector)0-1023
WallSignalWall detector (IR reflectance)0-4095
IRInfrared comm signal0-255
CliffLeftSignalCliff detectors 0-4095
CliffFrontLeftSignal
CliffFrontRightSignal     
CliffRightSignal
DistanceDistance traveled in millimeters (negative for backward motion)-32768 to 32767
AngleAngle in degrees that the robot has turned; counterclockwise is positive-32768 to 32767
BatteryVoltage Battery and charging state
BatteryCurrent
BatteryCharge
BatteryTemp
ChargingState
ModeStateOpen Interface mode: 0=Off, 1=Passive, 2=Safe, 3=Full0-3

Buttons

The buttons consist of physical buttons that users can press (the Play and Advance buttons, the left and right bump switches, and the wheel drop sensors), and virtual "buttons" that indicate an event such as an over-current condition or the detection of a virtual wall. All button values are binary (0 or 1).

Button NameFunction
PlayUser input buttons: see Create Controls and Indicators
Advance
WallVirtual wall detector (not the same as IR reflectance sensor)
CasterDropCliff detection
LWheelDrop
RWheelDrop
LBumpBump sensors
RBump
LOverCurrentWheel motor current limit exceeded
ROverCurrent
DriverLow0User-available driver current limit exceeded
DriverLow1
DriverLow2
BaseChargerRobot is connected to base charging station
InternalChargerRobot's charging cord is plugged in

Outputs

Output NameFunctionValue
WHEEL:LWheel velocity in mm/sec-500 to 500
WHEEL:R
LED:Power(Red)Power LED intensity = max(red,green)
Power LED redness = 255*red / (red+green)
0.0 to 1.0
LED:Power(Green)
LED:PlayLED intensity: 0=full off, 1=full on, intermediate values blink0.0 to 1.0
LED:Advance
DesiredModeSet the ModeState; not supported in Tekkotsu

Duties

Name
WHEEL:L
WHEEL:R

Using the Sensor Observer

You can monitor any of the above values using the Sensor Observer in the ControllerGUI:

  1. Go to Root Control > Status Reports > Sensor Observer
  2. Choose one of the sections Sensors, Buttons, Outputs, or Duties
  3. Check the boxes of the values you want to monitor
  4. Hit the Back button to return to the main Sensor Observer menu
  5. Double-click on Real-Time View to display the values in the ControllerGUI.
  6. To write the values to the console instead, double click on Console Output.
  7. To log the values to a file, type the file name in the ControllerGUI's Send Input box, then double click on File Output.
  8. Uncheck the Console Output or File Output checkbox to terminate logging.