Class SharpIrGP2Y0A41

Inheritance Relationships

Base Type

Class Documentation

class SharpIrGP2Y0A41 : public tap::sensors::AnalogDistanceSensor

Basic SHARP IR Sensor via analog input. Returns distance in cm.

The distance conversion can be tweaked depending on the sensor.

Public Functions

SharpIrGP2Y0A41(Drivers *drivers, gpio::Analog::Pin pin)

Constructor to init Sharp IR analog pin.

Parameters:

pin[in] the analog pin to attach the sensor to.

inline virtual void init() override

Init not needed for Sharp IR.