MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
MeLimitSwitch.h
Go to the documentation of this file.
1
39/* Define to prevent recursive inclusion -------------------------------------*/
40#ifndef MeLimitSwitch_H
41#define MeLimitSwitch_H
42
43/* Includes ------------------------------------------------------------------*/
44#include <stdint.h>
45#include <stdbool.h>
46#include <Arduino.h>
47#include "MeConfig.h"
48
49#ifdef ME_PORT_DEFINED
50#include "MePort.h"
51#endif // ME_PORT_DEFINED
52
53/* Exported classes ----------------------------------------------------------*/
59#ifndef ME_PORT_DEFINED
60 class MeLimitSwitch
61#else // !ME_PORT_DEFINED
62class MeLimitSwitch : public MePort
63#endif // !ME_PORT_DEFINED
64{
65 public:
66#ifdef ME_PORT_DEFINED
73 MeLimitSwitch(void);
74
81 MeLimitSwitch(uint8_t port);
82
91 MeLimitSwitch(uint8_t port, uint8_t slot);
92#else // ME_PORT_DEFINED
98 MeLimitSwitch(uint8_t switchPin);
99#endif // ME_PORT_DEFINED
114 void setpin(uint8_t switchPin);
115
130 bool touched(void);
131
132 private:
133 uint8_t _switchPin;
134};
135#endif
MeConfig.h
Configuration file of library.
MePort.h
Header for MePort.cpp module.
MeLimitSwitch
Driver for Me_LimitSwitch module.
Definition MeLimitSwitch.h:64
MeLimitSwitch::MeLimitSwitch
MeLimitSwitch(void)
Definition MeLimitSwitch.cpp:53
MeLimitSwitch::touched
bool touched(void)
Definition MeLimitSwitch.cpp:146
MePort
Port Mapping for RJ25.
Definition MePort.h:128