MakeBlock Drive Updated Updated library for MakeBlock Ranger

Loading...
Searching...
No Matches
MeFlameSensor.h
Go to the documentation of this file.
1
40#ifndef MeFlameSensor_H
41#define MeFlameSensor_H
42
43#include <stdint.h>
44#include <stdbool.h>
45#include <Arduino.h>
46#include "MeConfig.h"
47
48
49#ifdef ME_PORT_DEFINED
50#include "MePort.h"
51#endif // ME_PORT_DEFINED
52
53#define Fire (0x00)
54#define NoFire (0x01)
55
61#ifndef ME_PORT_DEFINED
62 class MeFlameSensor
63#else // !ME_PORT_DEFINED
64class MeFlameSensor : public MePort
65#endif // !ME_PORT_DEFINED
66{
67 public:
68#ifdef ME_PORT_DEFINED
75 MeFlameSensor(void);
76
82 MeFlameSensor(uint8_t port);
83#else //ME_PORT_DEFINED
84 MeFlameSensor(uint8_t digital_pin,uint8_t analog_pin);
85#endif // ME_PORT_DEFINED
102 void setpin(uint8_t digital_pin,uint8_t analog_pin);
117 uint8_t readDigital(void);
118
131 int16_t readAnalog(void);
132 private:
133 volatile uint8_t _digital_pin;
134 volatile uint8_t _analog_pin;
135};
136#endif
137
MeConfig.h
Configuration file of library.
MePort.h
Header for MePort.cpp module.
MeFlameSensor
Driver for Me flame snesor device.
Definition MeFlameSensor.h:66
MeFlameSensor::readDigital
uint8_t readDigital(void)
Definition MeFlameSensor.cpp:120
MeFlameSensor::readAnalog
int16_t readAnalog(void)
Definition MeFlameSensor.cpp:141
MeFlameSensor::MeFlameSensor
MeFlameSensor(void)
Definition MeFlameSensor.cpp:49
MePort
Port Mapping for RJ25.
Definition MePort.h:128