Enclenchement des clignotants selon 3 positions
This commit is contained in:
@@ -77,7 +77,18 @@ void setup() {
|
||||
|
||||
/* Steering wheel module */
|
||||
// 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
|
||||
ZenDrive.setBlinkerRight(digitalRead(RIGHT_BLINKER_PIN));
|
||||
// Warning
|
||||
|
||||
Reference in New Issue
Block a user