@RequestMapping("/shutdown.html")
  public String shutdown() {

    gpio.shutdown();
    leftBackMotor.low();
    leftFrontMotor.low();
    rightBackMotor.low();
    rightFrontMotor.low();
    gpio.unprovisionPin(leftBackMotor);
    gpio.unprovisionPin(rightBackMotor);
    gpio.unprovisionPin(rightFrontMotor);
    gpio.unprovisionPin(leftFrontMotor);

    return "Program was shutdown correctly";
  }
 private void unprovision(Pin pin) {
   for (GpioPin e : gpioContoller.getProvisionedPins()) {
     if (e.getPin().equals(pin)) {
       gpioContoller.unprovisionPin(e);
       break;
     }
   }
 }
Пример #3
0
 @Override
 public void unprovisionPin(GpioPin... pin) {
   delegate.unprovisionPin(pin);
 }