Peritoneal Dialysis Capstone
Controlling catheter for peritoneal dialysis
Loading...
Searching...
No Matches
PWMOutput.h
Go to the documentation of this file.
1
4
5#ifndef PWM_OUTPUT_H
6#define PWM_OUTPUT_H
7
8#include <IHAL.h>
9#include <IOutput.h>
10
14class PWMOutput : public IOutput {
15public:
22 PWMOutput(IHAL &hal, int pin);
23
24 float getValue() override;
25 void setValue(float value) override;
26
27private:
29 int m_pin;
30 float m_value;
31};
32
33#endif // PWM_OUTPUT_H
A hardware abstraction layer interface.
Definition IHAL.h:29
An analog output interface.
Definition IOutput.h:13
float m_value
Definition PWMOutput.h:30
IHAL & m_hal
Definition PWMOutput.h:28
PWMOutput(IHAL &hal, int pin)
Configures a pin as a PWM output.
Definition PWMOutput.cpp:4
float getValue() override
Returns the last value written to this output.
Definition PWMOutput.cpp:9
void setValue(float value) override
Writes a value to this output.
Definition PWMOutput.cpp:13
int m_pin
Definition PWMOutput.h:29
ArduinoHAL hal(BAUD_RATE)