Table of Contents

setirsensor()

Function Definition: setirsensor(set_left = 'D1', set_middle = 'D2', set_right = 'D3')

Parameters

NameTypeDescriptionExpected ValuesDefault Value
set_leftstringSet IR pin to Left sensor'D1''D1'
set_middlestringSet IR pin to middle sensor'D2''D2'
set_rightstringSet IR pin to right sensor'D3''D3'

Description

Using this function, we can Set the 3 pins to which IR Sensors are connected for Line Following for left, middle, and right sensing respectively.

setirsensor(“D1”,“D2”,“D3”)
 Note: For 3 IR Sensors, the threshold is set by the potentiometers on the sensors as they work with digital value.

Example

There are no examples documented for this article.