MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
MePotentiometer.h
Go to the documentation of this file.
1
38#ifndef MePotentiometer_H
39#define MePotentiometer_H
40
41#include <stdint.h>
42#include <stdbool.h>
43#include <Arduino.h>
44#include "MeConfig.h"
45
46#ifdef ME_PORT_DEFINED
47#include "MePort.h"
48#endif // ME_PORT_DEFINED
49
55#ifndef ME_PORT_DEFINED
56 class MePotentiometer
57#else // !ME_PORT_DEFINED
58class MePotentiometer : public MePort
59#endif // !ME_PORT_DEFINED
60{
61 public:
62#ifdef ME_PORT_DEFINED
69 MePotentiometer(void);
70
76 MePotentiometer(uint8_t port);
77#else // ME_PORT_DEFINED
83 MePotentiometer(uint8_t potentiometerPin);
84#endif // ME_PORT_DEFINED
99 void setpin(uint8_t potentiometerPin);
100
115 uint16_t read(void);
116 private:
117 volatile uint8_t _potentiometerPin;
118};
119#endif // MePotentiometer_H
MeConfig.h
Configuration file of library.
MePort.h
Header for MePort.cpp module.
MePort
Port Mapping for RJ25.
Definition MePort.h:128
MePotentiometer
Driver for Me potentiometer module.
Definition MePotentiometer.h:60
MePotentiometer::read
uint16_t read(void)
Definition MePotentiometer.cpp:119
MePotentiometer::MePotentiometer
MePotentiometer(void)
Definition MePotentiometer.cpp:56