29 lines
418 B
C++
29 lines
418 B
C++
// Out.h
|
|
#ifndef Out_h
|
|
#define Out_h
|
|
|
|
#include <Arduino.h>
|
|
|
|
class Out {
|
|
private:
|
|
byte pin;
|
|
unsigned char state;
|
|
int cycle;
|
|
unsigned long dur;
|
|
unsigned long len;
|
|
|
|
|
|
public:
|
|
Out(byte pin);
|
|
void turnOn();
|
|
void turnOff();
|
|
void setLen(unsigned long currentPeriod);
|
|
void setDiv(int newDiv);
|
|
void setWidth(int newWidth);
|
|
int getState();
|
|
byte width;
|
|
int div;
|
|
|
|
};
|
|
|
|
#endif
|