33 lines
520 B
C++
33 lines
520 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;
|
|
byte width;
|
|
byte divideMode;
|
|
int div;
|
|
int modifier;
|
|
String divString;
|
|
int p;
|
|
|
|
public:
|
|
Out(byte pin);
|
|
void turnOn();
|
|
void turnOff();
|
|
void setLen(unsigned long currentPeriod);
|
|
void setDiv(int newDiv, byte divide = 1);
|
|
void setWidth(int newWidth);
|
|
void setP(int prob);
|
|
int getState();
|
|
|
|
};
|
|
|
|
#endif
|