Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

...

Table of Contents

...

Overview

The Contrast Sensor will match a detected color to its Base Color and its Background Color to give an output depending on which of the two colors matches more with the detected color.

...

A Contrast Sensor analysing three cubes for a Base color and a Background color. The Output Signal returns High for the red cube since it corresponds to the Base color, and low for the green and blue cubes since they correspond more to the Background color

...

Where to find

The Contrast Sensor Physical and Logic components can be found under Standard Components > Color Sensor > Contrast Sensor.

...

Note

A new GameObject will be created if you do not have a GameObject selected. Otherwise, the Contrast Sensor will be added to the selected GameObject

...

Feature layout

Physical Component

...

Live Data

State

Shows whether the Contrast Sensor is currently active and thus whether it will detect a color

Output Signal

Shows whether or not the Contrast Sensor is currently detecting the Base Color or the Background Color

Match Percentage Base

The percentage by which the detected color matches the Base Color

Match Percentage Background

The percentage by which the detected color matches the Background Color

...

Control Panel

Generate Control Panel for ContrastSensor

Click this button to generate a Control Panel for the Contrast Sensor

...

Logic Component

...

Properties

ContrastSensor

The Phyisical Contrast Sensor component attached to this Logic component

...

PLC I/O

In the PLC I/O panel you can see the latest input and output values from the PLC

PLC settings and Debugging

These settings are general Logic Component settings.

...

How to use

  1. Assign a Contrast Sensor physical component to a GameObject, or create a new one directly from the menu

  2. Select the desired settings under the Properties tab

  3. In Play Mode, the Match Percentages of detected objects will be displayed, as well as the Output Signal