Table of Contents

Read All Sensor Readings

Description

This reporter block reads the states of all five IR sensors simultaneously and returns them as a single text value.

How It Works

The block combines the sensor readings into a five-character string, with each character representing the state of a sensor.

For example:

00100

This indicates that only the centre sensor is active, using the documented left-to-right display order.

The combined reading helps users observe the complete sensor array, check line detection, and develop custom line-following programs.

Python Function – Quarky and Quarky Intellio:

lf5ir.getallsensorreadings()

Example:

print(lf5ir.getallsensorreadings())

This displays the combined sensor states in the Python output.

Example

There are no examples documented for this article.