Enclenchement des clignotants selon 3 positions
This commit is contained in:
@@ -77,7 +77,18 @@ void setup() {
|
|||||||
|
|
||||||
/* Steering wheel module */
|
/* Steering wheel module */
|
||||||
// Left blinker
|
// Left blinker
|
||||||
ZenDrive.setBlinkerLeft(digitalRead(LEFT_BLINKER_PIN));
|
if(digitalRead(LEFT_BLINKER_PIN)){
|
||||||
|
ZenDrive.setBlinkerLeft(true);
|
||||||
|
ZenDrive.setBlinkerRight(false);
|
||||||
|
}
|
||||||
|
else if(digitalRead(RIGHT_BLINKER_PIN)){
|
||||||
|
ZenDrive.setBlinkerLeft(false);
|
||||||
|
ZenDrive.setBlinkerRight(true);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ZenDrive.setBlinkerLeft(false);
|
||||||
|
ZenDrive.setBlinkerRight(false);
|
||||||
|
}
|
||||||
// Right blinker
|
// Right blinker
|
||||||
ZenDrive.setBlinkerRight(digitalRead(RIGHT_BLINKER_PIN));
|
ZenDrive.setBlinkerRight(digitalRead(RIGHT_BLINKER_PIN));
|
||||||
// Warning
|
// Warning
|
||||||
|
|||||||
Reference in New Issue
Block a user