ME 405 Romi
Loading...
Searching...
No Matches
ir_sensor.IR_Sensor Class Reference

The IR_Sensor class is an object for each individual ir sensor on our line sensor. More...

Public Member Functions

 __init__ (self, my_pin)

Public Attributes

 adc = ADC(my_pin)
int black_ref = 0
int white_ref = 0
bool calibrated = False

Detailed Description

The IR_Sensor class is an object for each individual ir sensor on our line sensor.

Really just holds which sensor is which pin.

init is the IR_Sensor object initializer which takes 1 argument.

Parameters
my_pin: my_pin is the pyb pin ID of the IR sensor

Definition at line 14 of file ir_sensor.py.

Constructor & Destructor Documentation

◆ __init__()

ir_sensor.IR_Sensor.__init__ ( self,
my_pin )

Definition at line 16 of file ir_sensor.py.

Member Data Documentation

◆ adc

ir_sensor.IR_Sensor.adc = ADC(my_pin)

Definition at line 17 of file ir_sensor.py.

◆ black_ref

int ir_sensor.IR_Sensor.black_ref = 0

Definition at line 18 of file ir_sensor.py.

◆ calibrated

bool ir_sensor.IR_Sensor.calibrated = False

Definition at line 20 of file ir_sensor.py.

◆ white_ref

int ir_sensor.IR_Sensor.white_ref = 0

Definition at line 19 of file ir_sensor.py.


The documentation for this class was generated from the following file: