Browse Source

set bumper pin to pullup and corresponding interrupt to falling

master
Thorsten Riess 2 years ago
parent
commit
2425a2ee7e
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      steuerung/steuerung.ino

+ 4
- 2
steuerung/steuerung.ino View File

@@ -70,9 +70,11 @@ void setup()
// head motor pins to output
pinMode(HEAD_MOTOR_PIN1, OUTPUT);
pinMode(HEAD_MOTOR_PIN2, OUTPUT);
// bumper switch
pinMode(BUMPER_PIN, INPUT_PULLUP);
//
attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), interruptPositionUpdate, RISING);
attachInterrupt(digitalPinToInterrupt(BUMPER_PIN), interruptBumper, RISING);
attachInterrupt(digitalPinToInterrupt(BUMPER_PIN), interruptBumper, FALLING);
Serial.begin(19200);
}

Loading…
Cancel
Save