Create a class that represents a single reflectance sensor. It should take its pin number in the constructor and should have functions that change the sensor between output and input mode, as well as a function that reads the pin and returns HIGH or LOW. It will probably also need a way to keep track of whether or not it's been read.
Create a class that represents a single reflectance sensor. It should take its pin number in the constructor and should have functions that change the sensor between output and input mode, as well as a function that reads the pin and returns HIGH or LOW. It will probably also need a way to keep track of whether or not it's been read.