SensESP
3.0.1
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
digital_output.cpp
Go to the documentation of this file.
1
#include "
digital_output.h
"
2
3
#include "Arduino.h"
4
5
namespace
sensesp
{
6
7
DigitalOutput::DigitalOutput
(
int
pin) : pin_number_(pin) {
8
pinMode(pin, OUTPUT);
9
}
10
11
void
DigitalOutput::set
(
const
bool
& new_value) {
12
digitalWrite(pin_number_, new_value);
13
this->
emit
(new_value);
14
}
15
16
}
// namespace sensesp
sensesp::DigitalOutput::DigitalOutput
DigitalOutput(int pin)
Definition
digital_output.cpp:7
sensesp::DigitalOutput::set
void set(const bool &new_value) override
Definition
digital_output.cpp:11
sensesp::ValueProducer::emit
void emit(const T &new_value)
Definition
valueproducer.h:91
digital_output.h
sensesp
Definition
sensesp.cpp:7
src
sensesp
sensors
digital_output.cpp
Generated by
1.12.0