-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLed.cpp
More file actions
34 lines (28 loc) · 703 Bytes
/
Led.cpp
File metadata and controls
34 lines (28 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <Arduino.h>
#include "Led.h"
namespace hw
{
void Led::initialize()
{
setNetworkLed(0);
setBrightnessWhite(0);
setBrightnessBlue(0);
setBrightnessSwitchState(0);
}
void Led::setNetworkLed(const int& value)
{
analogWrite(LED3_PIN, constrain(value, 0, 255));
}
void Led::setBrightnessWhite(const int &value)
{
analogWrite(LED2_PIN, constrain(value, 0, 255));
}
void Led::setBrightnessBlue(const int &value)
{
analogWrite(LED1_PIN, constrain(value, 0, 255));
}
void Led::setBrightnessSwitchState(const int &value)
{
analogWrite(LED4_PIN, constrain(value, 0, 255));
}
}