ME 405 Romi
Loading...
Searching...
No Matches
line_sensor.py File Reference

This file contains a class to create a line sensor object. More...

Go to the source code of this file.

Classes

class  line_sensor.Line_Sensor
 Line_Sensor class which will calibrate the sensors, read data from the entire line, and find the centroid of the darkest spot. More...

Namespaces

namespace  line_sensor

Variables

int line_sensor.DATA_AMT = 5
int line_sensor.PITCH = 8

Detailed Description

This file contains a class to create a line sensor object.

The object can be used for calibrating the sensor and reading the centroid location of the darkest spot the sensors see.

NOTE: The outer 2 ir sensors are turned off by setting the corresponding self.sens_dist value to 0. Helped with line following lines that split.

IMPORTANT: Calibrating the sensor requires a text file name IR_cal.txt. This calibration will write that file but the user will need to stop ROMI, pull the file off onto a local computer and reflash it to the ROMI. If you do not, ROMI will not recognize the new file and will not calibrate.

Author
Alex Power, Lucas Heuchert, Erik Heuchert
Help from ChatGPT5
Date
2025-Nov-11 Approximate date of creation of file
2025-Dec-12 Final alterations made

Definition in file line_sensor.py.