FULL über analogWrite() und w{0-3} zu PIN_LIGHT{0-3] korrigiert.
This commit is contained in:
parent
364105de2c
commit
c8f84d1aa6
|
@ -159,27 +159,27 @@ void output() {
|
|||
// * 4 to scale the input up for ESP Arduino default 10 bit PWM
|
||||
if (w0 == FULL)
|
||||
{
|
||||
digitalWrite(PIN_LIGHT, HIGH);
|
||||
analogWrite(PIN_LIGHT, 1023);
|
||||
} else {
|
||||
analogWrite(PIN_LIGHT, w0 * 4);
|
||||
analogWrite(PIN_LIGHT, w0*4);
|
||||
}
|
||||
if (w1 == FULL)
|
||||
{
|
||||
digitalWrite(PIN_LIGHT1, HIGH);
|
||||
analogWrite(PIN_LIGHT1, 1023);
|
||||
} else {
|
||||
analogWrite(PIN_LIGHT1, w0 * 4);
|
||||
analogWrite(PIN_LIGHT1, w1*4);
|
||||
}
|
||||
if (w2 == FULL)
|
||||
{
|
||||
digitalWrite(PIN_LIGHT2, HIGH);
|
||||
analogWrite(PIN_LIGHT2, 1023);
|
||||
} else {
|
||||
analogWrite(PIN_LIGHT2, w0 * 4);
|
||||
analogWrite(PIN_LIGHT2, w2*4);
|
||||
}
|
||||
if (w3 == FULL)
|
||||
if (w3 == FULL)
|
||||
{
|
||||
digitalWrite(PIN_LIGHT3, HIGH);
|
||||
analogWrite(PIN_LIGHT3, 1023);
|
||||
} else {
|
||||
analogWrite(PIN_LIGHT3, w0 * 4);
|
||||
analogWrite(PIN_LIGHT3, w3*4);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue