Sensors

Sensors are declared in config/hardware.yml and used in missions through Defs. Most of them double as until conditions for driving steps, for example drive_forward().until(on_black(Defs.front.left)).

Each sensor type has one page that covers its entry in hardware.yml and how to use it.

PageWhat it covers
hardware.ymlThe config file, the required button entry and the special entries
IR SensorsLine sensors: shielding, the black/white probability, stop conditions
Sensor GroupsPairs of IR sensors with pre-bound drive, strafe, follow and lineup steps
Digital Sensors and ButtonsButtons and limit switches
Analog and ET SensorsRaw analog readings and the ET distance sensor

IR sensors need calibration to give reliable readings. The start lamp sensor has its own page: Wait for Light . The camera is not a sensor in hardware.yml, see Camera .

Written by Mario Scholze