GP2Y0A21YK0F IRsensor 用ライブラリ

Dependents:   IRsensor_sample 2019NHK_A_sensor 200_yotsuba_21

IRsensor.h

Committer:
skouki
Date:
2019-06-24
Revision:
0:d0a252247fec
Child:
2:35b3dd6f7f17

File content as of revision 0:d0a252247fec:

#ifndef IRSENSOR_H
#define IRSENSOR_H

#include "mbed.h"

class IRsensor{
 public:
    IRsensor(PinName pin);
    float getDistance(int n);

private:
    float getInputvoltage();
    float changeVtoD(float voltage);
    AnalogIn a_in;
};

#endif