Invert logic for use with solid state relays rather than standard
This commit is contained in:
parent
83efbc18c7
commit
b1745c786b
|
@ -91,8 +91,8 @@ void pins () {
|
||||||
pinMode(LED_FWD, OUTPUT);
|
pinMode(LED_FWD, OUTPUT);
|
||||||
pinMode(LED_BWD, OUTPUT);
|
pinMode(LED_BWD, OUTPUT);
|
||||||
|
|
||||||
digitalWrite(PROJECTOR_FWD, HIGH);
|
digitalWrite(PROJECTOR_FWD, LOW);
|
||||||
digitalWrite(PROJECTOR_BWD, HIGH);
|
digitalWrite(PROJECTOR_BWD, LOW);
|
||||||
|
|
||||||
digitalWrite(LED_FWD, LOW);
|
digitalWrite(LED_FWD, LOW);
|
||||||
digitalWrite(LED_BWD, LOW);
|
digitalWrite(LED_BWD, LOW);
|
||||||
|
@ -114,10 +114,10 @@ void proj_start () {
|
||||||
proj_time = millis();
|
proj_time = millis();
|
||||||
|
|
||||||
if (proj_dir) {
|
if (proj_dir) {
|
||||||
digitalWrite(PROJECTOR_FWD, LOW);
|
digitalWrite(PROJECTOR_FWD, HIGH);
|
||||||
digitalWrite(LED_FWD, HIGH);
|
digitalWrite(LED_FWD, HIGH);
|
||||||
} else {
|
} else {
|
||||||
digitalWrite(PROJECTOR_BWD, LOW);
|
digitalWrite(PROJECTOR_BWD, HIGH);
|
||||||
digitalWrite(LED_BWD, HIGH);
|
digitalWrite(LED_BWD, HIGH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,8 +127,8 @@ void proj_start () {
|
||||||
void proj_stop () {
|
void proj_stop () {
|
||||||
//stop both directions
|
//stop both directions
|
||||||
delay(10);
|
delay(10);
|
||||||
digitalWrite(PROJECTOR_FWD, HIGH);
|
digitalWrite(PROJECTOR_FWD, LOW);
|
||||||
digitalWrite(PROJECTOR_BWD, HIGH);
|
digitalWrite(PROJECTOR_BWD, LOW);
|
||||||
digitalWrite(LED_FWD, LOW);
|
digitalWrite(LED_FWD, LOW);
|
||||||
digitalWrite(LED_BWD, LOW);
|
digitalWrite(LED_BWD, LOW);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue