TI RSLK Library
0.2.0
src
GP2Y0A21_Sensor.h
1
#ifndef GP2Y0A21_Sensor_h
2
#define GP2Y0A21_Sensor_h
3
4
#include "Energia.h"
5
9
10
class
GP2Y0A21_Sensor
11
{
12
private
:
13
uint8_t ir_sensor_pin;
14
uint8_t num_pins;
15
bool
configured;
16
17
public
:
18
GP2Y0A21_Sensor
();
19
26
bool
begin
(uint8_t pin_num,uint8_t mode = INPUT_PULLDOWN);
27
35
uint16_t
read
();
36
};
37
38
#endif
GP2Y0A21_Sensor::begin
bool begin(uint8_t pin_num, uint8_t mode=INPUT_PULLDOWN)
Initialize the distance sensor class.
Definition:
GP2Y0A21_Sensor.cpp:9
GP2Y0A21_Sensor
Class for Pololu's Sharp GP2Y0A21YK0F analog distance sensor.
Definition:
GP2Y0A21_Sensor.h:10
GP2Y0A21_Sensor::read
uint16_t read()
Read the value from distance sensor.
Definition:
GP2Y0A21_Sensor.cpp:16
Generated by
1.8.16