Simple Arduino FSM
Door.h
Go to the documentation of this file.
1 
11 #ifndef DOOR_H
12 #define DOOR_H
13 
14 #include "Arduino.h"
15 
16 #include "LogConfiguration.h"
17 
22 class Door {
23  //=====PUBLIC====================================================================================
24  public:
33  Door(int positionClosed, int positionOpen);
34 
41  bool open();
42 
49  bool close();
50 
51  //=====PRIVATE====================================================================================
52  private:
53  const int pPosClosed;
54  const int pPosOpen;
55  int pActualPos = 3;
56 
61  void init();
62 };
63 
64 #endif
int pActualPos
Initial door position somwhere between.
Definition: Door.h:55
void init()
Initialisen the Door in closed Position.
Definition: Door.cpp:47
bool close()
Closes the Door one Step per Function-Call.
Definition: Door.cpp:34
Provides the basic Functions to Controll the Door.
Definition: Door.h:22
const int pPosOpen
Position of the open door.
Definition: Door.h:54
Contains Pre-Compiler directives for diffent Serialprints for Datalogin.
bool open()
Opens the Door one Step per Function-Call.
Definition: Door.cpp:22
Door(int positionClosed, int positionOpen)
Construct a new Door object.
Definition: Door.cpp:14
const int pPosClosed
Position of the closed door.
Definition: Door.h:53