Can Opener - ME 507
limitSwitch.h
1 #ifndef LIMIT_SWITCH_H
2 #define LIMIT_SWITCH_H
3 
4 #include <Arduino.h>
5 
6 
15  protected:
17  uint8_t switchID;
19  uint8_t inPin;
21  bool triggered;
22 
23  public:
24  LimitSwitch(uint8_t switchID, uint8_t inPin);
25 
26  bool readSwitch(void);
27 };
28 
29 
30 #endif
Class which reads from a limit switch.
Definition: limitSwitch.h:14
LimitSwitch(uint8_t switchID, uint8_t inPin)
Constructor for the LimitSwitch class.
Definition: limitSwitch.cpp:17
uint8_t switchID
ID of switch.
Definition: limitSwitch.h:17
uint8_t inPin
Input pin on board
Definition: limitSwitch.h:19
bool triggered
Triggered status.
Definition: limitSwitch.h:21
bool readSwitch(void)
Reads the condition of the limit switch.
Definition: limitSwitch.cpp:34