Line Bricklet

Note

The Line Bricklet is discontinued. We are selling our remaining stock. The Color Bricklet 2.0 is the recommended replacement.

Features

  • Measures the reflectivity of a surface
  • Can be used to detect/follow lines
  • Can be used to measure distances of ca. 0-10mm

Description

The Line Bricklet can extend Bricks by a reflective optical sensor. The sensor consists of an infrared emitter and a phototransistor. Output of the sensor is the reflectivity of a surface.

The reflectivity value can be used to detect and follow lines (e.g. a black line has a different reflectivity then a white background). The Line Bricklet can also be used to measure the distance to a surface, since the received light decreases with increased distance.

Technical Specifications

Property Value
Sensor CNY70
Current Consumption 33mA
   
Resolution 12bit
Emitter Wavelength 950nm
   
Dimensions (W x D x H) 25 x 15 x 9mm (0.98 x 0.59 x 0.35")
Weight 2g

Resources

Test your Line Bricklet

To test a Line Bricklet you need to have Brick Daemon and Brick Viewer installed. Brick Daemon acts as a proxy between the USB interface of the Bricks and the API bindings. Brick Viewer connects to Brick Daemon. It helps to figure out basic information about the connected Bricks and Bricklets and allows to test them.

Connect the Line Bricklet to a Brick with a Bricklet Cable.

If you connect the Brick to the PC over USB, you should see a new tab named "Line Bricklet" in the Brick Viewer after a moment. Select this tab. If everything went as expected you can now see the currently measured reflectivity. To test it you can for example move the Bricklet over a white paper with black stripes on it.

Line Bricklet in Brick Viewer

After this test you can go on with writing your own application. See the Programming Interface section for the API of the Line Bricklet and examples in different programming languages.

Mounting of the Line Bricklet

To be used as a line detector the Bricklet has to be mounted with a fixed distance to the line. The mounting distance depends on the reflectiveness of the line and the underground. It can be found out by trial and error.

There is a mounting Plate available for the Line Bricklet in the shop which simplifies the mounting. It consists of a mounting plate with fixed distance:

Line Bricklet Mounting Plate Version 1

And a mounting plate with configurable distance:

Line Bricklet Mounting Plate Version 2

Programming Interface

See Programming Interface for a detailed description.

Language API Examples Installation
C/C++ API Examples Installation
C# API Examples Installation
Delphi/Lazarus API Examples Installation
Go API Examples Installation
Java API Examples Installation
JavaScript API Examples Installation
LabVIEW API Examples Installation
Mathematica API Examples Installation
MATLAB/Octave API Examples Installation
MQTT API Examples Installation
openHAB API Examples Installation
Perl API Examples Installation
PHP API Examples Installation
Python API Examples Installation
Ruby API Examples Installation
Rust API Examples Installation
Shell API Examples Installation
Visual Basic .NET API Examples Installation
TCP/IP API    
Modbus API