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
5namespace sensesp {
6
7DigitalOutput::DigitalOutput(int pin) : pin_number_(pin) {
8 pinMode(pin, OUTPUT);
9}
10
11void DigitalOutput::set(const bool& new_value) {
12 digitalWrite(pin_number_, new_value);
13 this->emit(new_value);
14}
15
16} // namespace sensesp
void set(const bool &new_value) override
void emit(const T &new_value)