mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
first
This commit is contained in:
31
include/items/vImpulsOut.h
Normal file
31
include/items/vImpulsOut.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
#include "Global.h"
|
||||
|
||||
class ImpulsOutClass;
|
||||
|
||||
typedef std::vector<ImpulsOutClass> MyImpulsOutVector;
|
||||
|
||||
class ImpulsOutClass {
|
||||
public:
|
||||
ImpulsOutClass(unsigned int impulsPin);
|
||||
~ImpulsOutClass();
|
||||
|
||||
void loop();
|
||||
void execute(unsigned long impulsPeriod, unsigned int impulsCount);
|
||||
|
||||
private:
|
||||
unsigned long currentMillis;
|
||||
unsigned long prevMillis;
|
||||
unsigned long difference;
|
||||
unsigned long _impulsPeriod = 0;
|
||||
unsigned int _impulsCount = 0;
|
||||
unsigned int _impulsCountBuf = 0;
|
||||
unsigned int _impulsPin = 0;
|
||||
|
||||
};
|
||||
|
||||
extern MyImpulsOutVector* myImpulsOut;
|
||||
|
||||
extern void impuls();
|
||||
extern void impulsExecute();
|
||||
Reference in New Issue
Block a user