Ivobot
Robotics in der BU2 der Kantonsschule am Burggraben
irsensor.h
1 #ifndef IRSENSOR_INCLUDED
2 #define IRSENSOR_INCLUDED
3 
8 class IRSensor {
9  public:
15  IRSensor(int ledPin, int outPin);
16 
18  void on();
19 
21  void off();
22 
24  int read();
25 
30  // complete measure:
31  // difference between led on and off
32  int measure();
33 
34  private:
35  int ledPin;
36  int outPin;
37 };
38 
39 
40 #endif
int read()
Output auslesen (einfaches analogRead)
Definition: irsensor.cpp:21
void on()
LED anschalten.
Definition: irsensor.cpp:13
int measure()
Definition: irsensor.cpp:25
Definition: irsensor.h:8
IRSensor(int ledPin, int outPin)
Definition: irsensor.cpp:4
void off()
LED ausschalten.
Definition: irsensor.cpp:17